Forum Discussion
WSeirafi
2 years agoHelper I
IF statement performance
Hello, I'm witnessing a performance issue for a quite simple measure used in a big table. If I use this measure, the result is instant Measure = VAR CurrentVal = SELECTEDVALUE ( Table[Column...
Greg_Deckler
2 years agoCommunity Champion
WSeirafi ISBLANK is notorious for bad performance. Try this:
Measure =
IF (
SELECTEDVALUE ( Table[Column] ) = BLANK(),
1,
0
)
or
Measure =
IF (
SELECTEDVALUE ( Table[Column] ) <> BLANK(),
0,
1
)
or
Measure =
SWITCH( SELECTEDVALUE ( Table[Column] ),
BLANK(), 1,
0
)
- WSeirafi2 years agoHelper I
I tried with both suggestions you gave
Measure =VAR CurrentVal = SELECTEDVALUE ( Table[Column] )RETURNSWITCH(CurrentVal,BLANK(),1,0)
Didn't change anything. There is no other way to do this ?I would have added a calculated column, but this is supposed to be reacting to a slicer- Greg_Deckler2 years agoCommunity Champion
WSeirafi It's hard to say with the information provided. Would need additional context of the problem you are actually trying to solve. Is this something that could be done using the Filter pane?
- WSeirafi2 years agoHelper I
Might be a solution