EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials PowerBI Tutorial Measures in Power BI
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

Measures in Power BI

By Priya PedamkarPriya Pedamkar

Measures in Power BI

Definition of Measures in Power BI

Measures in Power BI are used for defining the calculation. This is done using DAX Language (Data Analysis Expression). DAX calculates each value of each row. Whereas if we use such kind of functions in excel then we will be able to get only aggregate values. But in Power BI using DAX we can apply any type of function which we use in Excel, which can also be used in Power BI using Measures. In Power BI, we use Measure to calculate the different functions and perform different mathematical operations in DAX platform.

How to Create Measures in Power BI?

Function fx bar is the place where we will be writing our DAX code for Measures. And here can use all the function which we have seen in MS Excel. If we go in the Edit Query option after we upload the data, we will be able to see the function fx bar, which we already saw and used in MS Excel as shown below.

Example #1 – Measures Power BI

Here we have some sales data below in which the sale of electronic products such as Laptop, Desktop, Tablet and Mobile is given as shown below. So you can download the excel workbook from the below link which is used for this example.

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

Power bi Measures (Excel Data)

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

As we can see, major columns which are Product type, Product class, Unit Price and Quantity Sold. We will see using the above data and insert some new columns and apply Measures therein.

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,241 ratings)
  • For this, upload the data in Power BI. Go to Get Data option and select the source.

Power bi Measures Example 1-1

  • Once we do that, browse the file location and open it. After that, we will get a Navigator window. In that select the sheet/s which we want to upload in Power BI. Here the sheet is named as Sales Data. Then click on Load.

Example 1-2 (Navigator window)

  • We will be able to see the uploaded data in Power BI under the Fields section.

Power bi Measures Example 1-3

  • And this will be visible also under Data tab as shown below.

Power bi Measures Example 1-4

  • Here we will delete the unnecessary columns from uploaded tables, such as Part Number column.

Power bi Measures Example 1-6

  • Further, now let’s add another new column as Final Sales Amount. For this click anywhere on the table header and select New Column.

Power bi Measures Example 1-5

  • Give the name which we want to newly inserted column. Here we have given the same which we have seen above, Final Sales Amount.

Power bi Measures Example 1-7

  • Now in formula write the mathematical multiplication formula to where we will multiply Unit Price and Quantity to get Final Sales figures.

Power bi Measures Example 1-8

  • We will be then able to see the name of a newly inserted column in Fields section.

Example 1-9 ((Fields))

  • Now we will create Measure, where we will add a measure for average quantity sold. For this, we can click Right as we did above and select Measure or else we can go to Modelling ribbon and select Measure from there.

Power bi Measures Example 1-10

  • Here we will create a Measure for calculating Average quantity sold. And name then measure with such kind of name.

Power bi Measures Example 1-11

  • Now use Average function just like we do in MS Excel.

Power bi Measures Example 1-12

  • And then select the column for which we need to calculate Average. Here are the measurable column will Quantity column of table Sales Data.

Power bi Measures Example 1-13

  • Once done, then press enter. We will see, a new measure is created with the name Avg_Qty_Sold under Fields section as shown below.

Example 1-14 (Fields)

We can change the name of created Measures by clicking 2 times on it in the Fields section easily if required.

Now next we will go to the Report tab and use all the created Measure and Calculated columns.

  • Let’s use a Stacked Column Chart to compare to average quantities sold in each city.

Power bi Measures Example 1-15

  • For this, we will drag Avg_Qty_Sold into values and City Names into Axis as shown below.

Power bi Measures Example 1-16

  • We will see the plot where each city has its average quantity sold.

Power bi Measures Example 1-17

  • Now we will create a Table chart. Where we will overall summary of Sales Data which we have uploaded. For this, select Table chart from the Visualization section.

Example 1-18 (Table chart)

  • Now to apply created fields in Table first we need to identify what we need to conclude. Here we will show, Salesperson wise how many products are sold and what was the average quantities were sold by each salesperson. For this, in sequence, we will drag the fields as shown below.

Example 1-19 (Fields)

Then our Table we look like as shown below.

Example 1-20 (Created Table)

We can see, salesperson Ashwani has the highest average selling record which is 64.00 Qty. And salesperson Shraddha has given the highest sales figure among all the salespersons which is 4430.

This is how we have concluded and used create Fields and Measures for showing Average and Total sales product, city and salesperson wise.

NOTE: Power BI Measures file can also be downloaded from the link below and the final output can be viewed.

You can download this Power BI Measures Template here – Power BI Measures Template

Pros of Measure In Power BI

  • Measures are useful in creating various calculation tasks.
  • We can apply all the MS Excel Insert function and Power BI function using Measure in Power BI.
  • We can add any type of formula to create measures.

Things to Remember

  • Before using Measures in Power BI, first, analyse and visualize what we need to find and conclude using create measures.
  • Measure in Power BI is created using DAX mainly.
  • Measures are not visible in a table but all the measures can be seen under the Fields section of the same table name.
  • Measure carries the formula which eventually gives the output while we use them in any charts and visualizations.

Recommended Articles

This is a guide to Measures in Power BI. Here we discuss how to create measures in power bi to calculate different DAX function along with practical examples. You may also look at the following articles to learn more –

  1. How to Use Filter Function in Power BI?
  2. Power BI Tutorial For Beginners
  3. Use of Power BI IF Statement
  4. Power BI Calendar(Examples)
  5. Power BI Maps | How to Use?
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 Measures Template

EDUCBA

Download Power BI Measures 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