Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Microsoft Power BI Community
- Forums
- Get Help with Power BI
- Desktop
- measure vs column

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

measure vs column

04-07-2022
09:53 AM

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.

1 ACCEPTED SOLUTION

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

04-07-2022
10:29 AM

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

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

04-11-2022
10:09 PM

Please mark the relevant answer as correct and help the community as well

Ritesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

04-11-2022
06:56 PM

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:

- Place the calculated results in a slicer, or see results in rows or columns in a pivot table (as opposed to the values area), or in the axes of a chart, or use the result as a filter condition in a DAX query.
- Define an expression that is strictly bound to the current row. For example, Price * Quantity cannot work on an average or on a sum of the two columns.
- Categorize text or numbers. For example, a range of values for a measure, a range of ages of customers, such as 0–18, 18–25, and so on.

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:

- When you calculate profit percentage on a certain selection of data.
- When you calculate ratios of a product compared to all products but keeping the filter both by year and region.

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

04-07-2022
10:29 AM

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

04-07-2022
10:17 AM

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.

I hope my reply answered your question. If so, please accept it as the Solution.

-------------------------------------------------------------------------------------------------------------

If you'd like 1:1 tutoring sessions with me, I can be found on Wyzant too! Just follow the link below.

https://www.wyzant.com/Tutors/BrendanMSBA

Microsoft Certified Power BI Data Analyst

Featured Topics

Top Solution Authors

User | Count |
---|---|

183 | |

79 | |

74 | |

74 | |

47 |

Top Kudoed Authors

User | Count |
---|---|

167 | |

91 | |

89 | |

79 | |

74 |