DAX Calculate Efficiency of Filter on Fact vs. Related Table

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have a fact file containing a column of measures and corresponding values, for example,

MeasureValue
Volume100
Revenue70
Cost20

<tbody>
</tbody>

This is repeated for thousands of transactions across many months - so my table is a few hundred thousand rows.

I want to write measures for each of the "Measures" in my fact file, for instance

Sum of Volume
Sum of Revenue
Sum of Cost

Is it more efficient to do this

= CALCULATE( SUM( Fact[Value] ), Fact[Measure] = "Volume" )

or better to create a related table of the list of unique Measures

Volume
Revenue
Cost

And then write my calculate formula as

= CALCULATE ( SUM Fact[Value], RelatedMeasuresTable[Measure] = "Volume" )

Is one more efficient than the other?

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I'm struggling to see the benefit of the latter approach. Why would that be quicker?

A couple of hundred thousand rows should be no problem anyway.
 
Upvote 0
I'm struggling to see the benefit of the latter approach. Why would that be quicker?

A couple of hundred thousand rows should be no problem anyway.

I just wasn't sure - I thought I read somewhere that filtering on a related table containing just the unique values was supposed to be better than filtering on the fact table containing many duplicates in a given column. Maybe it doesn't matter much in this case. Thanks
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top