EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Power BI learn Power BI DAX
 

Power BI DAX

Priya Pedamkar
Article byPriya Pedamkar

Updated March 21, 2023

Power BI DAX

 

 

Power BI DAX Functions

DAX in Power BI stands for Data Analysis Expressions. It is a formula expression language used in Power BI and other visualization tools as well. It is used for creating different types of formulas. We all have been using different excel functions for a long time in MS Excel. DAX is like the Insert Function of Excel. In DAX, we write the different types of formulas that are used for data modeling Power BI.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

As to get the sum of any column data in Excel, we use the Sum function. In a similar way, we use the Sum function in Power BI to get the sum of different and selected columns. It is just an example. Apart from sum we can perform many types of functions and apply many or any type of mathematical function in DAX.

If we know how to use Excel insert functions, then it will be easy for us to use DAX in Power BI. Many people are familiar with the types of data types used in DAX. These data types are the same as those used in Excel such as Integers, Double, String, etc. Also, these data types have different types of function categories as well such as Aggregate, Text, Logical, Counting and Information. And the method of application is the same as the Insert function of MS Excel.

How to Use DAX Formula in Power BI?

To use Power BI DAX formula you need data to work with, so you can download the excel workbook from the below link which is used for this example.

You can download this Power BI DAX Excel Template here – Power BI DAX Excel Template

We have a table of sales data of some electronic products such as Mobile, Desktop, Tablet, and Laptop.

Power BI DAX 1-1

Now open Power BI. We will be getting a window to sign up. Skip the window and get into the first home page of Power BI.

  • To import data in Power BI, click on Get Data option which is there in the Home menu bar as shown below.

Power BI DAX 1-2

  • Now select the type of file which we want to upload. Here, our data is in an excel file. Select the Excel file and click on Connect.

Power BI DAX 1-3

  • This will take us to browse window. From there we will search and open the file which we want to upload.

Power BI DAX 1-4

  • Now from the Navigator window mark the sheet which we want to select and work on. Here, our sheet is named Sheet1. Once we check the box against the sheet name we will be able to see the data in that sheet. Now click on the Load button. We can choose to transform data if we want to do some changes in data.

Power BI DAX 1-5

  • Once data is uploaded in Power BI, we will be able to see the columns name in Fields section as shown below. This is available on the right-hand side of the window.

Power BI DAX 1-6

  • Select the data that we want to use for calculation. Let’s say that column be Quantity. To see the data, we will select Card visualization.

Select Card visualization

This will give visualization as shown below.

Power BI DAX 1-8

  • Now we will insert a new column with the help of DAX in an uploaded column and there we will insert formula for calculating the sum of the sale. For this, create a new column by right-clicking on the sheet name which is there in Fields section.

Power BI DAX 1-9

  • We will get a similar formula bar field of excel in Power BI. There we will see the name of the column.

Power BI DAX 1-10

  • Now here, we can change the name of the column as per our need. Let say the name be Sum of Sale. To get the Sum of Sale we need to multiply Unit Price and Quantity of Sheet1 like below.

Power BI DAX 1-11

  • Now we will select the created column Sum of Sale, in a similar way as we will did above.

Created column Sum of Sale

We will see, as per the formula used above for the sum of sale, we got the outcome in card visual as 1 Billion.

Power BI DAX 1-13

This is the way of using the Basic simple formula in DAX.

  • Now we will be storing the calculated fields. For that go to the Home menu tab and click on Enter Data option as shown below.

Enter Data

  • Now we will get the Create table option. Enter the new name of Table as Sales Calculation and click on Load.

Create table option

We will see, the fields section is now having the Table that we have created along with the column it has.

Power BI DAX 1-16

Now the real DAX we will see under the table which we have created.

  • Right-click on the Sales Calculation table and select a new measure in the name of Calculation.

Select New Measure

  • Insert any function you want. Let say Average and press Enter to confirm.

Power BI DAX 1-18

  • Now we will select the created measure Calculation, in a similar way as we did above.

Measure Calculation

As per the formula used, we got the outcome in card visual as 38.69.

Power BI DAX 1-20

This is how we can insert many more functions and formulas in Power BI using DAX. We can try to insert Sum, Count functions as well for better understanding.

NOTE: Power BI dashboard file can also be downloaded from the link below and the final output can be viewed.
You can download this Power BI DAX Template here – Power BI DAX Template

Pros of Power BI DAX Function

  • It is very easy to use DAX and insert different functions there.
  • We can use and link any sheets and functions together.
  • The application and use are the same as we use Insert function in MS Excel.

Things to Remember

  • DAX is not only used in Power BI but it is also available in different visualization tools.
  • DAX functions are the same as MS Excel insert function and also the most of the function in DAX has the same syntax as that of MS Excel functions.
  • To work in DAX, we must know the popular Excel function and their syntax, how to apply them.
  • DAX uses the same data type as we have used in VBA Macros.
  • Syntax of DAX always should start with the name of Sheet which has used while uploading the data in Power BI.

Recommended Articles

This is a guide to Power BI DAX. Here we discuss how to insert DAX formulas for calculation of data in the Power BI along with a practical example. You may also look at the following articles to learn more –

  1. Excel Hacks | Excel Template
  2. Convert Excel to CSV (Examples)
  3. Overview of Excel Mortgage Calculator
  4. How to Calculate Variance in Excel?
  5. How to Use Calendar DAX Function in Power BI?
  6. Power BI IF Statement
  7. How to Use Filter DAX Function in Power BI?
  8. Creating Sample Dashboard in Power BI
  9. Top Features of Power BI for Data Visualization
  10. Easy Steps of Power BI Charts

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Power BI DAX Template

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

EDUCBA

Download Power BI DAX Template

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Limited Time Offer! - ENROLL NOW