cancel
Showing results for
Search instead 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")

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

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!!

## Helpful resources

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors