-I use SSAS 2012 SP4 tabular version. The cube contains 2 facts tables and each one uses the same dimension tables (=7 dimension tables). There is no relation defined between 2 fact tables.
-The following measure is setup in Fact2 table:
Measure1 :=
IF (
SUM ( Fact1[ColumnA] ) = 0,
BLANK (),
IF (
SUM ( Fact2[ColumnB] ) > 0,
SUM ( Fact1[ColumnA] ) / SUM ( Fact2[ColumnB] ),
99
)
)
My Excel report is very long to refresh when I display this measure and several attributes.
-When I active a profiler trace I can see that the time spend in the Formula Engine is 80%. I have tried to rewrite the query with using the function DIVIDE() like this :
Measure1 := DIVIDE(sum(Fact1[ColumnA])/sum(Fact2[ColumnB]),99)
In this case the report is fast and query duration is better. But as I have removed the IF function I don't check any more "if sum(Fact1[ColumnA])=0"
It is possible to refactor this DAX formula in order to improve performance. And keeping the check "IF sum(Fact1[ColumnA])=0 THEN BLANK()" ?
Thanks a lot for your help Em