I have a fact file containing a column of measures and corresponding values, for example,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Measure[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Volume[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Revenue[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]Cost[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Measure[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Volume[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Revenue[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]Cost[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]
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