Forum Discussion
Winniethewinner
Helper IV
4 years agoDAX 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
Community Champion
4 years agothe 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
)
)