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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
comish4lif
Helper II
Helper II

Measures - Row Level vs the Table Level

I have a measure that calculates properly at the row level.

 

LeagueR1Bi =
DIVIDE(SUM('Table 0'[R1_BI]), SUM('Table 0'[R1]))

 

But I also want to have a version of that calculation at the table level. That is, the sum of all values in the column R1_BI dividied by the sum of all values in the column R1. If I do not select a row to highlight/filter, the calculation displays and calculates correctly.

 

However, if I want to compare the row's calculation to the table's calculation, it will only show the row calculation.

 

How can I compare the row calculation to the table calculation?

 

For example, in one row - the values would be 63/392 = 16.1%,

but for the entire table, the values would be 6957/51801 = 13.4%

1 ACCEPTED SOLUTION
DaFloDo
Resolver I
Resolver I

hi @comish4lif,

 

try 

 

TableMeasureIgnoreFilter = DIVIDE(calculate(SUM('Table 0'[R1_BI]); All('Table 0')); CALCULATE(sum('Table 0'[R1]);ALL('Table 0')) )

 

best regards

 

florian

View solution in original post

4 REPLIES 4
DaFloDo
Resolver I
Resolver I

hi @comish4lif,

 

try 

 

TableMeasureIgnoreFilter = DIVIDE(calculate(SUM('Table 0'[R1_BI]); All('Table 0')); CALCULATE(sum('Table 0'[R1]);ALL('Table 0')) )

 

best regards

 

florian

That is giving me an error - It doesn't like one of the semi-colons.

 

The syntax for ';' is incorrect. (DAX(DIVIDE(calculate(SUM('Table 0'[R1_BI]);All('Table 0'));CALCULATE(sum('Table 0'[R1]);ALL('Table 0')) ))).

Sorry, please exchange semicolons by commata ... I have to use semicolons because of regional operating system reasons i guess.

That's it - thanks, for those in the US:

 

LeagueR1BI = DIVIDE(calculate(SUM('Table 0'[R1_BI]),All('Table 0')),CALCULATE(sum('Table 0'[R1]),ALL('Table 0')) )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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