Forum Discussion
Winniethewinner
4 years agoHelper IV
DAX help: switch selectedvalue not working
Hi everyone, I have a switch DAX. However when I add it to the visual, it shows "Can't display the visual": Tickets_WOW_% =
SWITCH(SELECTEDVALUE(Tickets_Measures[Name]),
"Revenue", IF(AND(Tick...
tamerj1
4 years agoCommunity Champion
the location of the first BLANK() is wrong. However you don't need to specify BLANK () as the 2nd argument of IF as it is blank by default.
Tickets_WOW_% =
SWITCH (
SELECTEDVALUE ( Tickets_Measures[Name] ),
"Revenue",
IF (
AND ( [This Week] <> BLANK (), [Last Week] <> BLANK () ),
DIVIDE ( [This Week], [Last Week] ) - 1
),
"CPN Count",
IF (
AND ( [This Week] <> BLANK (), [Last Week] <> BLANK () ),
DIVIDE ( [This Week], [Last Week] ) - 1
),
"Rev per CPN",
IF (
AND ( [This Week] <> BLANK (), [Last Week] <> BLANK () ),
DIVIDE ( [This Week], [Last Week] ) - 1
)
)