What is DAX?

Patient Tools

Read, save, and share this guide

Use these quick tools to make this medical article easier to read, print, save, or share with a family member.

Article Summary

DAX is the language of Microsoft Power BI. It lets you create calculated columns and measures to make your data work for you. This article takes a detailed look at DAX, explains how it works, and shows some examples of what you can do with it. We also cover the different ways DAX can help you analyze your data. Whether you’re just starting with Power...

Key Takeaways

  • This article explains What is DAX? in simple medical language.
  • This article explains ‍Common DAX use cases in Power BI  in simple medical language.
  • This article explains ‍Expressions in DAX in simple medical language.
  • This article explains ‍Calculations in DAX in simple medical language.
Educational health guideWritten for patient understanding and clinical awareness.
Reviewed content workflowUse writer and reviewer profiles for stronger trust.
Emergency safety firstUrgent warning signs are highlighted below.

Seek urgent medical care if you notice

These warning signs are general safety guidance. Local emergency numbers and clinical judgment should always come first.

  • Severe symptoms, breathing difficulty, fainting, confusion, or rapidly worsening illness.
  • New weakness, severe pain, high fever, or symptoms after a serious injury.
  • Any symptom that feels urgent, unusual, or unsafe for the patient.
1

Emergency now

Use emergency care for severe, sudden, rapidly worsening, or life-threatening symptoms.

2

See a doctor

Book a professional medical evaluation if symptoms persist, worsen, recur often, affect daily activities, or occur in a high-risk patient.

3

Learn safely

Use this article to understand possible causes, tests, treatment options, prevention, and questions to ask your clinician.

DAX is the language of Microsoft Power BI. It lets you create calculated columns and measures to make your data work for you.

This article takes a detailed look at DAX, explains how it works, and shows some examples of what you can do with it. We also cover the different ways DAX can help you analyze your data.

Whether you’re just starting with Power BI or already familiar with DAX, this article has valuable information for everyone.

What is DAX?

Data Analysis Expressions (DAX) is a powerful formula language designed specifically for data modeling in Power BI. DAX formulas calculate measures and perform analysis throughout Power BI, often used to avoid complex calculations and manual workarounds in analytical models.

With DAX, users can create custom calculations involving mathematical and statistical formulas, time intelligence functions, and other operators. Users can also utilize DAX to enhance data models with calculated columns, which are new columns generated by DAX formulas based on existing columns in the data model.

DAX and Power Query are often confused. Let’s go over some key differences. Power Query and DAX are both tools for performing data analysis. Power Query is a self-service business intelligence (BI) tool to fetch and transform data. It’s user-friendly and available to nontechnical users.

DAX, on the other hand, is a more technical tool designed for use by analysts and developers. It can create custom calculations and measures. While Power Query can perform many of the same tasks as DAX, it’s not as powerful or flexible. Consequently, DAX is often the preferred choice for complex data analysis services.

DAX functions perform calculations on data already in your Power BI data set. This is different from Microsoft Excel, which can perform calculations only on data imported into the spreadsheet.

In addition, DAX can create dynamic filters that change the filter context for other visuals on a report page based on user interactions with visuals on the page.

The DAX language is continuously evolving, with new functions and features added regularly. As a result, Power BI users proficient in DAX can always find new ways to solve complex problems and perform sophisticated analyses.

Common DAX use cases in Power BI 

DAX is a language used to create custom calculations in Power BI. DAX includes a wide variety of functions to perform many different types of data analysis.

Some common use cases for DAX include:

  • Calculating percentages and totals. Use DAX to calculate things like the percentage of total sales or the total number of customers.
  • Creating custom aggregations. Use DAX to create custom aggregations, like the average customer spending over time.
  • Filtering and sorting data. Use DAX to filter and sort data in Power BI based on specific criteria.
  • Understanding customer data to drive marketing. Use data to understand customer needs and preferences and make key marketing available to your team.

If you’re new to DAX, here are a few things you should know.

  • DAX is a formula language, meaning all DAX formulas must start with an equal sign (=).
  • DAX formulas are case-sensitive; use the correct case when writing your formulas.
  • DAX includes many of the same functions available in Excel. Those familiar with Microsoft Excel will find learning DAX fairly easy.
  • Power BI has a built-in function library you can use to help write DAX formulas. This function library includes helpful information about each function and examples of how to use each function.

Expressions in DAX

Expressions in DAX are used to perform logical operations on data. You can use DAX expressions to compare values, filter data, and calculate results.

If you’re looking for more general information on DAX, Power BI, Power BI desktop, and more, Microsoft provides a tutorial that covers the following topics:

  • An overview of logical functions in DAX
  • How to use DAX expressions to compare values
  • How to use DAX expressions to filter data
  • How to calculate results using DAX expressions

Calculations in DAX

You can use DAX to perform a variety of calculations on data sets. You can also use data types in DAX calculations.

The two types of calculations are calculated columns and calculated measures. Calculated columns are based on a single column of data, while calculated measures are based on multiple columns of data.

Calculated columns create a new column in your existing table. The only difference between a regular column and a calculated column is that it’s necessary to have at least one function in the calculated column. Use these when creating a column with filtered or sorted information.

Calculated measures, on the other hand, create a field with aggregated values like sums, ratios, percentages, averages, etc.

Most common DAX functions

DAX is the native language of Power BI and is used to perform data analysis tasks, such as calculating new columns in tables and creating measures to summarize data. You can use DAX to power pivot data in Excel, providing a way to manipulate and analyze data that’s not possible with traditional Excel formulas.

DAX includes a variety of functions to perform mathematical calculations, manipulate text values, work with dates and time values, and more. DAX has a specific syntax that must be followed to calculate values correctly. This syntax is different from traditional Excel formulas.

Microsoft’s DAX function reference provides detailed information on syntax, parameters, return values, and examples for each of the over 250 functions used in DAX formulas. That’s a lot of functions on Microsoft Power BI!

The DAX syntax includes a number of operators and functions to calculate values. Let’s go over some of the major functions in more detail.

Aggregation functions

Many aggregate functions are already available in DAX, and the list continues to grow with new releases of Power BI. These functions allow you to perform mathematical operations on your data set.

The aggregate function you use will depend on the type of data you’re working with and the results you’re trying to achieve.

It’s important to keep in mind the data type of the values you’re working with when using aggregate functions. Aggregate functions will return a different data type depending on the data type of the values that you are aggregating. When using aggregate functions, you can also specify an optional filter expression to further refine the results of the aggregate calculation.

Let’s explore several aggregate functions in more detail.

  • AVERAGE. The AVERAGE function takes an arithmetic mean of the values in the column for data analytics.
  • MAX. MAX returns the largest value in a column or between two scalar expressions for Power BI reports.
  • MIN. The MIN function takes a column or two expressions as an argument and returns the smallest value. The following types of values in the columns are counted:
  • Numbers
  • Texts
  • Dates
  • Blanks
  • SUM. Sum and SUMX both do the same thing: aggregate data! It can be difficult to tell the difference, but it ultimately depends on the data set you need to generate. The SUM function is a simple aggregation function. It summarizes a value based on a filter context.
  • SUMX. SUMX is the sum of an expression, the X at the end of this function is for eXpression. SUMX is an iterator function used in different instances of data science. However, you need to specify a table name for SUMX to work. When using SUM, you don’t need a table name because one column only belongs to one table. But when using SUMX, you may write an expression that uses columns from other tables.

Counting functions

Counting functions in Power BI are used to count the number of items in a column or table. There are many counting functions, but the most commonly used are COUNT, COUNTA, and COUNTBLANK.

These functions are useful for performing calculations on data. For example, you could use the COUNT function to count the number of rows in a table or the COUNTA function to count the number of non-empty cells in a column.

  • COUNT. COUNT counts the number of cells that contain numbers, dates, or strings. This function is often used to count the number of rows in a table.
  • COUNTA. COUNTA counts the number of cells that are not blank. This function is often used to count the number of non-empty cells in a column.
  • COUNTBLANK. COUNTBLANK counts the number of blank cells. This function is often used to count the number of empty cells in a column.
  • COUNTROWS. This function counts the number of rows in a base table, but more often is used to count the number of rows that result from filtering a table or applying context to a table. The return value for this Power BI DAX function is a whole number and depends on row context.
  • DISTINCTCOUNT. DISTINCTCOUNT returns the number of distinct values in a column. The only argument allowed to this function is a column. You can use columns containing any type of data. When the function finds no rows to count, it returns a BLANK; otherwise, it returns the count of distinct values.

Logical functions

Logical functions in Power BI are used for testing conditions and returning a result. The most commonly used logic functions are IF, AND, and OR.

  • AND. AND tests multiple conditions and returns TRUE if all conditions are true or FALSE if any condition is false.
  • OR. The OR logic function checks whether one of the arguments is true to return TRUE. The function returns FALSE if both arguments are false.
  • NOT. The NOT function changes FALSE to TRUE or TRUE to FALSE.
  • IF. IF tests a condition and returns one value if the condition is true and another value if the condition is false.
  • IFERROR. IFERROR evaluates an expression and returns a specified value if the expression returns an error; otherwise, it returns the value of the expression itself.

Information functions

You can use DAX to create custom visuals and reports. It’s also a great way to perform calculations on data. Information functions in Power BI are used to retrieve information about data, objects, and users. The most commonly used information functions are USERNAME and USERPRINCIPALNAME.

USERNAME returns the name of the current user. This function is often used to return the name of the person logged into Power BI.

USERPRINCIPALNAME returns the user principal name of the current user. This function is often used to return the email address of the person logged in to Power BI.

Here are some other common information functions:

  • ISBLANK. ISBLANK is a DAX function that checks whether a value is blank and returns TRUE or FALSE.
  • ISNUMBER. ISNUMBER checks whether a value is a number and returns TRUE or FALSE. It will return TRUE if the value is numeric; otherwise, FALSE.
  • ISTEXT. ISTEXT checks if a value is text and returns TRUE or FALSE.
  • ISNONTEXT. ISNONTEXT checks if a value is not text (blank cells are not text) and returns TRUE or FALSE.
  • ISERROR. ISERROR is used to check for errors. This information function checks whether a value is an error and returns TRUE or FALSE.

Text functions

Text functions are used for manipulating text data. The most commonly used text functions are LEFT, RIGHT, and LEN.

  • LEFT returns the leftmost characters of a string. This function is often used to return the first name from a full name.
  • RIGHT returns the rightmost characters of a string. This function is often used to return the last name from a full name.
  • LEN returns the length of a string. This function is often used to count the number of characters in a string.

Some other common text functions used in Power BI:

  • CONCATENATE. This text function joins two text strings into one concentrated text string.
  • REPLACE. REPLACE is very useful for correcting text errors or updating the text. REPLACE replaces part of a text string, based on the number of characters you specify, with a different text string.
  • SEARCH. Search is essential in data science. The SEARCH function returns the number of the character at which a specific character or text string is first found, reading left to right. Search is case insensitive and accent sensitive.
  • UPPER. While this Power BI text isn’t used often, it still performs an important DAX function. UPPER converts a text string to all uppercase letters.
  • FIXED. FIXED can help make data models and data analysis expressions easier to read by rounding numbers with decimals and returning them as text. FIXED rounds a number to the specified number of decimals and returns the result as text. You can specify that the result is returned with or without commas.

Date functions

DAX date functions are used for manipulating date data. The most commonly used DAX date functions are TODAY and NOW.

  • TODAY returns the current date. This function is often used to return the date on which a report was generated.
  • NOW returns the current date and time. This function is often used to return the date and time on which a report was generated.

These functions are very useful for manipulating date data sets.

  • DATE. DATE returns the specified date in DateTime format. Parameters include year, month, and day. DATE takes the integers that are input as arguments and generates the corresponding date. The DATE function is most useful in situations where the year, month, and day are supplied by formulas or data sets that may not be read as dates. For example, the underlying data might contain dates in a format not recognized as a date, such as YYYYMMDD. You can use the DATE function in conjunction with other functions to convert the dates to a number that can be recognized as a date.
  • HOUR. HOUR is a DAX function that returns the hour as a number from 0 (12 a.m.) to 23 (11 p.m.).
  • NOW. Returns the current date and time in DateTime format. The NOW function is useful when you need to display the current date and time on a worksheet or calculate a value based on the current date and time and have that value updated each time you open the worksheet.
  • EOMONTH. The only constant regarding DAX functions is how endlessly specific they can be. The EOMONTH function returns the date in DateTime format of the last day of the month, before or after a specified number of months. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month—a useful tool when it’s a data set important to your business intelligence.
  • WEEKDAY. WEEKDAY returns a number from 1 to 7, identifying the day of the week of a date. By default, the day ranges from 1 (Sunday) to 7 (Saturday).

Work as a Power BI consultant by browsing available jobs on Upwork today. With hundreds of jobs posted, you choose when and how you work.

Advanced functions 

Advanced functions in Microsoft Power BI are used to perform more complex calculations on data. Advanced functions include:

  • Filter functions
  • Financial functions
  • Math and trig functions
  • Parent and child functions
  • Statistical functions
  • Table manipulation functions
  • Time intelligence functions

How to add DAX formulas in Power BI

Below are three ways to add DAX formulas within Power Bi.

  • Use the Add Column button in the Modeling ribbon to create a custom column. This will open the Formula Bar, where you can enter your DAX formula.
  • You can also add DAX formulas to measures. To do this, open the Measure pane and click on the New Measure button. This will open the Formula Bar to enter your DAX formula.
  • Finally, you can add DAX formulas to conditional formatting rules. To do this, go to the Formatting pane and select the conditional formatting rule you want to edit. In the Edit Formatting Rule dialog box, go to the Value field and click on the Fx icon. This will open the EditExpression dialog box, where you can enter your DAX formula.

Why you should use DAX in Power BI

While DAX may seem daunting at first, its flexibility and power make it an essential tool for any Power BI user. By mastering DAX, you can unlock the full potential of Power BI and create truly insightful data visualizations.

Using DAX in Power BI is recommended for anyone who wants to perform sophisticated data analysis. With DAX, you can go beyond simple visualization and uncover hidden insights in your data. For instance, DAX can help you create smart calculated columns to speed up analysis performance and make data more simple, elegant, and easy to read.

Dynamic columns, tables, and measures also help you improve your way of viewing, understanding, and thinking about how to efficiently filter, merge, and manipulate data.

The job of a Power BI specialist 

As a Power BI specialist, you’re responsible for designing and creating robust, visually appealing business intelligence (BI) solutions. You work closely with clients to understand their needs and objectives and translate those into actionable insights using Power BI tools.

Power BI specialists are in high demand due to the ever-growing reliance on data analytics. As a Power BI specialist, you’ll be responsible for developing and maintaining Power BI dashboards and reports for organizations.

You may also be involved in data analysis and modeling, as well as developing custom applications on the Power BI platform. A Power BI specialist with the right skill set can pursue a variety of exciting career options.

In the world of business intelligence, data analysis is king. And when it comes to analyzing data, few tools are as powerful as DAX. If you’re a Power BI specialist, Upwork is here to help you land your perfect project assignment. Our platform connects businesses with independent professionals from around the globe, making it easy for you to find work that fits your skills and schedule.

Patient safety assistant

Check your symptom safely

Hi, I am RX Symptom Navigator. I can help you understand what to read next and what warning signs need care.
Warning: Do not use this in emergencies, pregnancy, severe illness, or as a substitute for a doctor. For children or teens, use with a parent/guardian and clinician.
A rural-friendly guide: warning signs, when to see a doctor, related articles, tests to discuss, and OTC safety education.
1 Symptom 2 Severity 3 Safe guidance
First safety question

Is there chest pain, breathing trouble, fainting, confusion, severe bleeding, stroke-like weakness, severe injury, or pregnancy danger sign?

Choose quickly

Browse by body area
Start here: Write or select a symptom. The guide will show warning signs, doctor guidance, diagnostic tests to discuss, OTC safety education, and related RX articles.

Important: This tool is educational only. It cannot diagnose, treat, or replace a doctor. OTC information is not a prescription. In an emergency, contact local emergency services or go to the nearest hospital.

Doctor visit helper

Prepare before seeing a doctor

A simple rural-patient checklist to help you explain symptoms clearly, ask better questions, and avoid unsafe self-treatment.

Safety note: This is not a prescription or diagnosis. For severe symptoms, pregnancy danger signs, children with serious illness, chest pain, breathing difficulty, stroke-like weakness, or major injury, seek urgent care.

Which doctor may help?

Start with a registered doctor or the nearest qualified health center.

What to tell the doctor

  • Write when the problem started and how it changed.
  • Bring old prescriptions, investigation reports, and current medicines.
  • Write allergies, pregnancy status, diabetes, kidney/liver disease, and major past illnesses.
  • Bring one family member if the patient is weak, elderly, confused, or a child.

Questions to ask

  • What is the most likely cause of my symptoms?
  • Which danger signs mean I should go to hospital quickly?
  • Which tests are necessary now, and which can wait?
  • How should I take medicines safely and what side effects should I watch for?
  • When should I come for follow-up?

Tests to discuss

  • Vital signs: temperature, pulse, blood pressure, oxygen saturation
  • Basic physical examination by a clinician
  • CBC, urine test, blood sugar, or imaging only when clinically needed

Avoid these mistakes

  • Do not use antibiotics, steroid tablets/injections, or strong painkillers without proper medical advice.
  • Do not hide pregnancy, kidney disease, ulcer, allergy, or blood thinner use.
  • Do not delay emergency care when danger signs are present.

Medicine safety and first-aid guide

This section is for patient education only. It does not replace a doctor, pharmacist, or emergency care.

Safe first steps

  • Rest, drink safe water, and observe symptoms carefully.
  • Keep a written note of symptoms, duration, temperature, medicines already taken, and allergy history.
  • Seek medical care quickly if symptoms are severe, worsening, or unusual for the patient.

OTC medicine safety

  • For mild pain or fever, ask a registered pharmacist or doctor before using common over-the-counter pain/fever medicines.
  • Do not combine multiple pain medicines without advice, especially if you have kidney disease, liver disease, stomach ulcer, asthma, pregnancy, or take blood thinners.
  • Do not give adult medicines to children unless a qualified clinician advises it.

Avoid these mistakes

  • Do not start antibiotics without a proper medical decision.
  • Do not use steroid tablets or injections casually for quick relief.
  • Do not delay emergency care because of home remedies.

Get urgent help if

  • Severe symptoms, confusion, fainting, breathing difficulty, chest pain, severe dehydration, or sudden weakness need urgent medical care.
Medicine names, dose, and timing must be decided by a qualified clinician or pharmacist after checking age, pregnancy, allergy, other diseases, and current medicines.

For rural patients and family caregivers

Patient health record and symptom diary

Write your symptoms, medicines already taken, test results, and questions before visiting a doctor. This note stays on your device unless you print or copy it.

Doctor to discuss: Doctor / qualified healthcare provider
Tests to discuss with doctor
  • Basic vital signs: temperature, pulse, blood pressure, oxygen level if needed
  • Relevant blood, urine, imaging, or specialist tests only after clinical assessment
Questions to ask
  • What is the most likely cause of my symptoms?
  • Which warning signs mean I should go to emergency care?
  • Which tests are really needed now?
  • Which medicines are safe for my age, pregnancy status, allergy, kidney/liver/stomach condition, and current medicines?

Emergency warning signs such as chest pain, severe breathing difficulty, sudden weakness, confusion, severe dehydration, major injury, or loss of bladder/bowel control need urgent medical care. Do not wait for online information.

Safe pathway to proper treatment

Patient care roadmap

Use this simple roadmap to understand the next safe steps. It is educational and does not replace examination by a doctor.

Go to emergency care if you notice:
  • Severe or rapidly worsening symptoms
  • Breathing difficulty, chest pain, fainting, confusion, severe weakness, major injury, or severe dehydration
Doctor / service to discuss: Qualified healthcare provider; specialist depends on symptoms and examination.
  1. Step 1

    Check danger signs first

    If danger signs are present, seek emergency care and do not wait for online information.

  2. Step 2

    Record the symptom story

    Write when symptoms started, severity, medicines already taken, allergies, pregnancy status, and test results.

  3. Step 3

    Visit a qualified clinician

    A doctor, nurse, or qualified healthcare provider can examine you and decide which tests or treatment are needed.

  4. Step 4

    Do only useful tests

    Do tests after clinical assessment. Avoid unnecessary tests, random antibiotics, or repeated medicines without diagnosis.

  5. Step 5

    Follow up and return early if worse

    If symptoms worsen, new warning signs appear, or treatment is not helping, return for review quickly.

Rural patient practical tips
  • Take a written symptom diary and all previous prescriptions/test reports.
  • Do not hide medicines already taken, even herbal or over-the-counter medicines.
  • Ask which warning signs mean urgent referral to hospital.

This roadmap is for education. A real diagnosis and treatment plan requires history, examination, and clinical judgment.

RX Patient Help

Ask a health question safely

Write your symptom story. A health professional or site editor can review it before any answer is prepared. This box is not for emergency care.

Emergency first: Severe chest pain, breathing trouble, unconsciousness, stroke signs, severe injury, heavy bleeding, or rapidly worsening symptoms need urgent local medical care now.

Frequently Asked Questions

Is this article a replacement for a doctor?

No. It is educational content only. Patients should consult a qualified clinician for diagnosis and treatment.

When should I seek urgent care?

Seek urgent care for severe symptoms, rapidly worsening condition, breathing difficulty, severe pain, neurological changes, or any emergency warning sign.

References

Add references, clinical guidelines, textbooks, journal articles, or trusted medical sources here. You can edit this area from the RX Article Professional Blocks panel.