Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
AlB
Super User
Super User

Hi @Anonymous 

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 

SU18_powerbi_badge

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , 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")

AlB
Super User
Super User

Hi @Anonymous 

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 

SU18_powerbi_badge

Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.