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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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