Forum Discussion
WSeirafi
Helper I
2 years agoIF 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
Community Champion
2 years agoWSeirafi 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 ago
Helper 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 ago
Community 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 ago
Helper I
Might be a solution