Forum Discussion
Nested If
Hi balmin2304 ,
Based on your descriptions, I have changed the IF to measure:
Measure = SWITCH(TRUE(),
MAX('Table'[Achieved])<=0.65,1,
MAX('Table'[Achieved])>0.65&&MAX('Table'[Achieved])<0.95,2,
MAX('Table'[Achieved])>=0.95&&MAX('Table'[Achieved])<=1,3,
MAX('Table'[Achieved])>1&&MAX('Table'[Achieved])<1.5,4,5)
Output:
The measure works fine, but the result seems to be different with the Score and Rate, could you please share more details about how to calculate them to help us clarify your scenario?
Please provide me with more details about your data and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- balmin23044 years agoNew Member
Thank you for your reply and sorry for the delay in responding to you. The measure works fine, but my issue is that I have different targets for different items as shown in the table below. What I need to find is the Score based on the achieved against the rating scale mentioned for each.
Kpis KpI Wt Target Rt-1 Rt-2 Rt-3 Rt-4 Rt-5 Achieved Score Abdcd 100% As per approved budget ≤65% >65%-<95% ≥95%-≤100% >100%-<115% ≥115% 98% 3 nbnbnbn 100% 80% ≤65% >65%-<78% ≥78%-≤82% >82%-<90% ≥90% 84% 4 mnmnmn 100% 75% <60% ≥60%-<75% ≥75%-≤78% >78%-<86% ≥86% 79% 4 kjkjkjk 70% 3.5 ≤2.5 >2.5 -<3.3 ≥3.3 -≤3.7 >3.7 - <4.0 ≥4.0 3.8 4