Forum Discussion
mdrammeh
9 years agoHelper III
How to Create Measure for Multiple Criteria in Power Query
Hello, I need help creating the following measures in Power Query and Power BI separately: Measure If the “Cost variance” is less than or equal to -$10,000 and is -10% or Greater, retur...
mdrammeh
9 years agoHelper III
Thanks for the quick response. I just want to make sure am doing this correctly because it's showing an error message
Sean
9 years agoCommunity Champion
The above was DAX
In the Query Editor the formula would be...
= if [Cost Variance] <= -10000 and [#"% Change"] <= -.1 then "Under Budget"
else if [Cost Variance] >= 10001 and [#"% Change"] >= .1 then "Over Budget"
else if [Cost Variance] >= 9999 and [Cost Variance] <= 10000 then "On Target"
else null
- mdrammeh9 years agoHelper III
It worked everywhere except where the % Change field = "null". How can I correct this error?
- Anonymous9 years agoNot applicable
I'm not sure it's related to your error, but shouldn't the On Target statement cover the range from minus9999 to 10,000?
- dchager9 years agoRegular Visitor
You have to filter out the null values.