Forum Discussion
joepath
4 years agoHelper II
Dax Query optimization
Hello, Below query is for Total Sum of the positive values in tablur report, working as expected but liitle slow. How to rewrite it in optimize way? Correct Total Sum = SUMX( FILTER( AD...
mahoneypat
4 years agoMicrosoft Employee
I agree that measure looks pretty good, and would have written it the same way. How big is your Fact table and how many rows should that SUMMARIZE table have? One thing you could try would be to filter it sequentially with FILTER(FILTER(FILTER. Not sure it will help much but easy to try.
Correct Total Sum =
SUMX (
FILTER (
FILTER (
FILTER (
ADDCOLUMNS (
SUMMARIZE ( Fact, dimA[Aname], dimB[BName] ),
"@MeasureA", [MeasureA]
),
[@MeasureA] > 0
),
[MeasureB] > 0
),
[MeasureC] > 0
),
[@MeasureA]
)
Pat
- joepath4 years agoHelper II
Thanks all for looking into this, seems not much changes is required,