Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
lastnn30
Post Patron
Post Patron

What is the difference between a measure and calculated column

Hi

Simple google will show that this question has been asked many times and many videos and articls about it. However the more I read or watch video, the more I am confused. I would appreciate if you can simplfy the difference for me using simple example so I can understand the concept. Thank you very much for your help in advance.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @lastnn30 

 

Take an example.

Sample data:

vzhangti_0-1668393048138.png

Calculate the overall score for each student.

Calculated column:

Column = 
CALCULATE (
    SUM ( 'Table'[Scores] ),
    ALLEXCEPT('Table','Table'[Student]
))

vzhangti_1-1668393255511.png

Measure:

Measure = CALCULATE(SUM('Table'[Scores]),ALLEXCEPT('Table','Table'[Student]))

vzhangti_2-1668393806988.png

Here are a few differences:

1. Calculated columns appear in columns in the data view, measure does not, measure only appears in the view.

2. Calculated columns appear in the Model view, not Measure.

vzhangti_3-1668394062019.png

 

Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Mayur_kanth
New Member

U can see a calculated column in data view whereas u can't see a measure in data view. 

 

In order to see measure, we need to go to report view select any chart and then click on that measure to see that. 

 

  • Another difference is that Calculated column does operation row by row across columns 

 

For eg. :- We have 2 columns Revenue and Cost in a Table ( let's name it Financials) and we have revenue and cost of 10 products . So we have 2 columns with 10 rows each. 

If we want to know the Profit of 1st product ( i.e product in 1st row) , we can do that by creating a new column in data view >> then rename it as Profit and apply DAX formula as 

1.Profit = Financials[Revenue] - Financials[Cost] . This is what is a Calculated column.  

 

This same formula will now be applied to next 9 products row by row. And we will see a new column formed on the right side of Cost column. This new Column ( we named it Profit) is what is called a Calculated Column. We can actually see this newly created column in the data view. 

 

Measure :- 

  • Now imagine if we want to calculate the total Revenue or cost of all the 10 products . We will create a measure by writing Dax formula :- Total_Revenue = SUM(Financials[Revenue]) . Here the Total_Revenue is 1 single Value which gets calculated or aggregated over a column. So this is a measure and we cant see it in data view lile we see calculated column. 

If we want to see this we have to go to report view.>> select any chart ( let's say a card) and then drag or select this measure. Then we can see the value i.e revenue of all the 10 products. 

 

Hope this was helpful. Thanks for your patience. 

Mayur Kanth

Pune, India 

MS1992
Regular Visitor

Good day,

 

I batteling with these measure, all want is to create  a rule, that if the turnover is greater the the target must turn green, if not red. I am using a guage chart. This is the formule i am trying to use: 

 

"A single value for column 'OMSET' in table 'Bemarkers Detail' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result". This measures is breaking me and i am so fustrated.

 

Hope someone can assist

v-zhangti
Community Support
Community Support

Hi, @lastnn30 

 

Take an example.

Sample data:

vzhangti_0-1668393048138.png

Calculate the overall score for each student.

Calculated column:

Column = 
CALCULATE (
    SUM ( 'Table'[Scores] ),
    ALLEXCEPT('Table','Table'[Student]
))

vzhangti_1-1668393255511.png

Measure:

Measure = CALCULATE(SUM('Table'[Scores]),ALLEXCEPT('Table','Table'[Student]))

vzhangti_2-1668393806988.png

Here are a few differences:

1. Calculated columns appear in columns in the data view, measure does not, measure only appears in the view.

2. Calculated columns appear in the Model view, not Measure.

vzhangti_3-1668394062019.png

 

Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Actually the name of the measure appears in the model view, but it is not seen in the dataset as a column. You see its name as a column, but you cant see its content. But you can use it in the report.  

mangaus1111
Solution Sage
Solution Sage

Hi @lastnn30,

 a calculated column belongs to a single table, while a measure belongs to the whole data model.

 

A calculated column is evaluated in a row context (row by row, like in an excel table), while a measure is evaluated in the filter context.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.