Forum Discussion
DAX Improvement
I was just preparing a few measures that'll be hitting against million of records, thus taking a lot of time. I have two DAX formula's that I've written in measures in SSAS (Tabular). All I seek here is to improve the performance of these two formula so that I can even save a few mili seconds on each, thus saving a lot of time over all.
1) IF (
HASONEVALUE ( 'TableName'[QL] ) & SUM ( 'TableName'[Count] ) >= 20,
CALCULATE (ROUND (DIVIDE (SUM ( 'TableName'[WS]), SUM ( 'TableName'[WB] )),2)* 100 + 100,
'TableName'[TS] = "ABC" ),
BLANK ()
)
2) CALCULATE(DISTINCTCOUNT('TableName'[RS]), 'TableName'[WB] > 0)
The goal is to use as little as possible from the Formula Engine and rely more on the Storage Engine, or so the best practices say.
Thanks,
Harshey