Forum Discussion
rishari
3 years agoFrequent Visitor
Make if statement optimized an total visible
I'm new to DAX. Kindly help me on this. If i use zero for else statement, I'm getting error as insufficient memory. I want to make the below dax faster and total to be visible. DAX = IF ( ...
rishari
3 years agoFrequent Visitor
This one is taking too long to load. (30 million rows are there)
Keegan_Patton
Advocate II
3 years agoyou may try a combination of SUMX and CALCULATETABLE to acheive your goal and potentially improve performance.
SUMX (
CALCULATETABLE ( VALUES ( [Counter_flag] ), [Counter_flag] = 1 ),
SUM ( [Counter_flag] )
)- rishari3 years agoFrequent Visitor
Hi Keegan_Patton - Do you mean this ?
CALCULATE( DISTINTCOUNTNOBLANK([ColumnName]), SUMX ( CALCULATETABLE ( VALUES ( [Counter_flag] ), [Counter_flag] = 1 ), SUM ( [Counter_flag] ) ) )