Forum Discussion
DAX help: switch selectedvalue not working
Hi, Winniethewinner ;
Are these two the same measure? It doesn't look quite the same unless you change the name.
Note that you need to change the format of the field itself.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
actually Winniethewinner is using a calculation group to force $ format ove measures
- Winniethewinner4 years agoHelper IV
v-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.