Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi, I created measure and then a column but to my surprise they are the same when I created reports. They both sliced per item. So I do not see any difference except the Total. Why is that?
Thank you very much.
revenue-measure = SUM(Sheet1[price])*SUM((Sheet1[quantity]))
revenue-Col = Sheet1[price]*Sheet1[quantity]
Solved! Go to Solution.
This is expected, there is nothing to aggregate when you are at the lowest granularity (or say row-level )
hence, sheet(price)=sum(sheet(price)) -----
As mentioned by @bcharger 1000 is nothing but (10+20+30+40) * (1+2+3+4)=100*10=1000 because the measure will aggregate since it has got a chance to summarise for the 4 rows while for row-level it will sum up the values you see at the rows
See it this way,
----EXPLANATION OF THE DIFF IN THE TOTAL PART -------
TOTAL (SUM(PRICE) * SUM(QUANTITY)) ------
>>> SUM(PRICE)Let me first aggregate for the 4 rows
>>>SUM(QUANTITY) Let me first aggregate for the 4 rows
>>> Now do the multiplication
>>> Now TOTAL of the same
While in the former case
its PRICE * QUANTITY (No Sum) hence you get the individual rows multiplication
At the end you do the TOTAL
That set
Regards,
Ritesh
Regards,
Ritesh
Please mark the relevant answer as correct and help the community as well
Ritesh
Hi @lastnn30 ,
This brings us to the difference between measure and column.
Even if they look similar, there is a big difference between calculated columns and measures. The value of a calculated column is computed during data refresh and uses the current row as a context; it does not depend on user interaction in the report. A measure operates on aggregations of data defined by the current context, which depends on the filter applied in the report – such as slicer, rows, and columns selection in a pivot table, or axes and filters applied to a chart.
At this point, you might be wondering when to use calculated columns over measures. Sometimes either is an option, but in most situations your computation needs determine your choice.
You have to define a calculated column whenever you want to do the following:
However, you must define a measure whenever you want to display resulting calculation values that reflect user selections and see them in the values area of a pivot table, or in the plot area of a chart – for example:
Here is a simple sample, please refer to it to see if it helps you.
What is the difference between Power BI calculated columns and measures?
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is expected, there is nothing to aggregate when you are at the lowest granularity (or say row-level )
hence, sheet(price)=sum(sheet(price)) -----
As mentioned by @bcharger 1000 is nothing but (10+20+30+40) * (1+2+3+4)=100*10=1000 because the measure will aggregate since it has got a chance to summarise for the 4 rows while for row-level it will sum up the values you see at the rows
See it this way,
----EXPLANATION OF THE DIFF IN THE TOTAL PART -------
TOTAL (SUM(PRICE) * SUM(QUANTITY)) ------
>>> SUM(PRICE)Let me first aggregate for the 4 rows
>>>SUM(QUANTITY) Let me first aggregate for the 4 rows
>>> Now do the multiplication
>>> Now TOTAL of the same
While in the former case
its PRICE * QUANTITY (No Sum) hence you get the individual rows multiplication
At the end you do the TOTAL
That set
Regards,
Ritesh
Regards,
Ritesh
I believe; The measure is summing the price column (100) and summing the quantity column (10) then multiplying them to arrive at 1,000. The calculated column is looking at each row but not the aggregate.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
112 | |
105 | |
94 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |