Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I watched Marco's video but still don't get this.
I tried switching this to a SUMX and still got the same result.
I thought the row context was being established by the calculaed column and aggregator? What am I missing here.
Solved! Go to Solution.
When you are calculating a single row, the context is that single row. Thus if you do a "SUM" on a column of the current table, you will only be summing up 1 rows worth of values.
Instead you might want to use a calculate statement and provide a filter context. For example, this would give you a sum total of all of the prices where each row has the same location value. (I have no idea why you would do that, but i hope it illustrates the point).
Column = VAR LocationValue = [Location] RETURN CALCULATE( SUM ( Order[Price] ), ALL ( Order ), Order[Location] = LocationValue )
When you are calculating a single row, the context is that single row. Thus if you do a "SUM" on a column of the current table, you will only be summing up 1 rows worth of values.
Instead you might want to use a calculate statement and provide a filter context. For example, this would give you a sum total of all of the prices where each row has the same location value. (I have no idea why you would do that, but i hope it illustrates the point).
Column = VAR LocationValue = [Location] RETURN CALCULATE( SUM ( Order[Price] ), ALL ( Order ), Order[Location] = LocationValue )
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |