Forum Discussion
bilalkhokar73
Helper IV
5 years agoSwitch DAX showing wrong results
Hi, It seems its givign me still worng results need your help what i am missing, I need if my achvd% between 0 to 4 then Cvalue shoudl give me 0 IF Achvd % between 0.4 to 0.6 theen 60 like that , ...
amitchandak
Super User
5 years agobilalkhokar73 , measure seem correct. But make sure that achvd% is percent measure (marked as % in measure tool) . And these values are below 1 and shown as *100.
If not logic has to change
Try like this
cvalues = SWITCH(TRUE(),
,[achvd%]<=0.4,"0",
[achvd%]<=0.6,"60",
[achvd%]<=0.70,"70",
[achvd%]<=0.80,"80",
[achvd%]<=0.9,"90",
[achvd%]<=1,"100",
[achvd%]<=9.9,"125.5",
[achvd%]<=100,"14100",
"0")
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- bilalkhokar735 years ago
Helper IV
- bilalkhokar735 years ago
Helper IV
Hi amit thsi is my power bi link
https://www.dropbox.com/s/7zct41wc47xudt9/test.pbix?dl=0
this is my file here achvd% is coming wrong, I need one more new column name that will be achvd% divided by 100 as a new column
amitchandak