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 agoactually Winniethewinner is using a calculation group to force $ format ove measures
Winniethewinner
Helper IV
4 years agov-yalanwu-msft Those two are the same measures - I did a rename.
tamerj1 yes I use calculation group to force the number format when switching the measures.
Here is the formula for This Week:
This Week = CALCULATE([Selected_Measure],FILTER(Tickets,Tickets[ISSUE_WEEK]=MAX(Tickets[ISSUE_WEEK])))Here is the formula for Selected_Measure:
Selected_Measure =
SWITCH(SELECTEDVALUE(Tickets_Measures[Name]),
"Revenue", (SUM(Tickets[Sum(tot_rev)])),
"CPN Count", (SUM(Tickets[TOT_CPN_COUNT])),
"Rev per CPN", (DIVIDE(SUM(Tickets[Sum(tot_rev)]),SUM(Tickets[TOT_CPN_COUNT])))
)The formats are correct except for this WoW % (unless I use FORMAT to make it a string - but this doesn't work in a chart, can only work in a table or matrix). I'd like to see if there is a way to make this WoW % correct format and also works in a chart.