Forum Discussion
Greg_Deckler
Community Champion
5 years agoDAX Head Scratcher
Looking for some insight into why a DAX calculation coded in a particular way takes absolutely forever to return while a slightly different version returns quickly. I have the sample PBIX included be...
Greg_Deckler
Community Champion
5 years agoJos_Woolley OK, but where is that captured in the actual DAX query from Performance Analyzer? In both cases the query is the following and I don't see an ALL anywhere:
// DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL(
ROLLUPGROUP('1OptionMaster'[OptionID], '1OptionMaster'[PlanID], '1Plans'[PlanID]), "IsGrandTotalRowTotal"
),
"v1Frequency", '1OptionMaster'[1Frequency]
)
VAR __DS0PrimaryWindowed =
TOPN(
502,
__DS0Core,
[IsGrandTotalRowTotal],
0,
'1OptionMaster'[OptionID],
1,
'1OptionMaster'[PlanID],
1,
'1Plans'[PlanID],
1
)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC,
'1OptionMaster'[OptionID],
'1OptionMaster'[PlanID],
'1Plans'[PlanID]Jos_Woolley
Solution Sage
5 years ago- PaulOlding5 years ago
Solution Sage
The difference is in the measure definition in this line
"v1Frequency", '1OptionMaster'[1Frequency]