EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials PowerBI Tutorial Power BI DAX
Secondary Sidebar
PowerBI Tutorial
  • Advanced
    • Power BI Tutorial
    • KPI in Power BI
    • Power BI Calendar
    • Power BI Dashboard Samples
    • Power BI DAX
    • Power BI Filter
    • Power BI Icon
    • Slicers in Power BI
    • Power BI IF Statement
    • Power BI Template
    • Power BI Maps
    • Measures in Power BI
    • Power BI Report
    • Power BI SUMX
    • Power BI Charts
    • Power BI Pie Chart
    • Power BI Bullet Chart
    • Power BI Gantt Chart
    • Power BI Bubble Chart
    • Power BI Waterfall Chart
    • Power BI Drillthrough
    • Power BI Themes
    • Power BI Tooltips
    • Power BI Heat Map
    • Creating Reports in Power BI
    • Power BI Connections
  • Basic
    • What is Microsoft Power BI
    • Is Power BI Free?
    • Power BI Visuals
    • Power BI Parameters
    • Power BI Alternatives
  • Interview Questions
    • Power Bi Interview Questions

Related Courses

Power BI Certification Course

Business Intelligence Certification Course

Data Visualization Certification Course

Power BI DAX

By Priya PedamkarPriya Pedamkar

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.

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.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,354 ratings)
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
Popular Course in this category
Microsoft Power BI Training (6 Courses, 4 Projects)
  6 Online Courses |  4 Hands-on Projects |  45+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Business Intelligence Training (12 Courses, 6+ Projects)4.9
Data Visualization Training (15 Courses, 5+ Projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

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

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

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

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Power BI DAX Template

EDUCBA

Download Power BI DAX Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more