Forum Discussion
Check Range in 2 Columns and get required output value
Hi Guys
Please guide the query or way out to get the required output in Power BI
Thanks in advance
| Funding % | Winning % | Required Output |
| 100 | 100 | High |
| 100 | 75 | High |
| 100 | 50 | Med |
| 100 | 25 | Low |
| 100 | 0 | Low |
| 75 | 100 | High |
| 75 | 75 | High |
| 75 | 50 | Med |
| 75 | 25 | Low |
| 75 | 0 | Low |
| 50 | 100 | Med |
| 50 | 75 | Med |
| 50 | 50 | Med |
| 50 | 25 | Low |
| 50 | 0 | Low |
| 25 | 100 | Low |
| 25 | 75 | Low |
| 25 | 50 | Low |
| 25 | 25 | Low |
| 25 | 0 | Low |
| 0 | 100 | Low |
| 0 | 75 | Low |
| 0 | 50 | Low |
| 0 | 25 | Low |
| 0 | 0 | Low |
Hi, Abdullah-Ultra
You can try the following methods.
Column = SWITCH(TRUE(), [Funding %]>=75&&[Winning %]>=75,"High", [Funding %]>=50&&[Winning %]>=50,"Med", "Low")Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 Replies
- v-zhangti
Community Support
Hi, Abdullah-Ultra
You can try the following methods.
Column = SWITCH(TRUE(), [Funding %]>=75&&[Winning %]>=75,"High", [Funding %]>=50&&[Winning %]>=50,"Med", "Low")Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Abdullah-UltraFrequent Visitor
Thank you so much 🙂
- ribisht17
Super User
Should be a doable task , need to have the logic
If Winning% > 50 then medium ?
May I know the logic ?
Regards,
Ritesh
- Abdullah-UltraFrequent Visitor
Thank you .
Here is the Logic
- ribisht17
Super User
Here are the multiple optionsYou can use
SWITCH() like this which is much cleaner than nested IFs:Here you can use Probability of winning and funding instead inside the AND function
Age Group = SWITCH(TRUE(), AND([Age]>17, [Age]<28), "18-27", AND([Age]>27, [Age]<36), "28-35", AND([Age]>35, [Age]<44), "36-43", AND([Age]>43, [Age]<51), "44-50", [Age]>50, "50+", BLANK() )Please check this Solved: IF with multiple conditions - Microsoft Fabric Community
You can use the AND and OR functions or even embed IF statements in Power BI just like you can in excel if you have an if function with multiple criteria.
AND: https://docs.microsoft.com/en-us/dax/and-function-dax
OR: https://docs.microsoft.com/en-us/dax/or-function-dax
Depending on your situation you may also want to consider the SWITCH function: https://docs.microsoft.com/en-us/dax/switch-function-dax
Examples: https://community.powerbi.com/t5/Desktop/DAX-Measure-with-Nested-IF-Statements/td-p/113358
https://stackoverflow.com/questions/40254578/multiple-if-statements-in-dax
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series
- ribisht17
Super User
Please mark the answer and help the community in return if it helped or else let us know