Quantcast
Channel: All Power Query posts
Viewing all articles
Browse latest Browse all 122235

Re: IF function with multiple criteria

$
0
0

OK, for your second revised example, you could create three custom columns in Power Query:

 

Percent Difference = Number.Abs(([Estimated Dollars] - [Actual Dollars]) / [Estimated Dollars])

Difference = Number.Abs([Estimated Dollars] - [Actual Dollars])

Tolerance = if [Percent Difference] > .1 then "Out of Tolerance" else if [Difference] < 10 then "Review Estimate" else "Within Tolerance"

For the first one, the MAX query, that is something that is trivial in DAX but not necessarily in "M" code.  might have some insights into how to do that, she is the resident "M" wizard. I'll take a look but by the time I figure it out,  will have probably already posted the answer 3 days before. I imagine it will involve something like List.Max.


Viewing all articles
Browse latest Browse all 122235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>