cancel
Showing results for
Did you mean:
Helper I

## If % above 10% then "investigate"

Hi,

I have a measure;

% difference =
VAR __BASELINE_VALUE = SUM('UsageDetails'[Cost])
VAR __VALUE_TO_COMPARE = [previous day]
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)

This calculates the difference in cost between two days, I need to flag any above 10% difference for investigation into the increase in cost, I have tried a few different ways but they all show OK;
Investigate = if(VAR __BASELINE_VALUE = SUM('UsageDetails'[Cost])
VAR __VALUE_TO_COMPARE = [previous day]
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)> 10,"Investigate", "OK")

Many Thanks

Andy

1 ACCEPTED SOLUTION
Super User III

Hi @AndyM12

I haven't look in detail but it looks like you should use (10/100) for the comparison instead of 10. 10% is 0,1

Or, in fact, if you are looking for growth larger than 10%, it should actually be (110/100)

If you wanted to check for both growth or decrease larger than 10% you should look for results above (110/10) or below (90/100)

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

3 REPLIES 3
Super User IV

@AndyM12 , if other part of calculations fine then it should

DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)*100 > 10,"Investigate", "OK")

or

DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)> .10,"Investigate", "OK")

Proud to be a Super User!

Super User III

Hi @AndyM12

I haven't look in detail but it looks like you should use (10/100) for the comparison instead of 10. 10% is 0,1

Or, in fact, if you are looking for growth larger than 10%, it should actually be (110/100)

If you wanted to check for both growth or decrease larger than 10% you should look for results above (110/10) or below (90/100)

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

Helper I

Thanks, I went with > 10/100 that appears to be working!!

Announcements