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

I have created a percentage difference measure, can I flip the percentage? (Get the remainder %)

Hi there, 

Apologies if I'm not asking this right or if the answer is obvious, I currently have a report and I have two measures on it that are "Total Income" and "Total Estimate". Now I've created a third measure called "% Invoiced" that gets the % difference from Total Income and Total Estimate. I have already done that with the quick measure function and "% difference", however, I can only show the negative % from Estimates to Invoices rather than the % of Invoices from Estimates. Here's an example below: 

KyleAdam_0-1646227242949.png

The % shown above, I want to flip the % so that it shows the 7.51% instead, since that is the % of invoices (income) that has been invoiced from the total estimes. 

This is the % Invoiced measure: 

 

% Invoiced = 
VAR __BASELINE_VALUE = [Total Estimate]
VAR __VALUE_TO_COMPARE = [Total Income]
RETURN
	IF(
		NOT ISBLANK(__VALUE_TO_COMPARE),
		DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
	)

 

I have tried flipping the baseline value and the value to compare just incase however that doesn't work, instead I get over a 1000% of something. I was hoping there would be a simple way to rectify this problem? 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

It should be [Total Estimate]-[Total Income], not [Total Income]-[Total Estimate], modify the formula like this:

% Invoiced =
VAR __BASELINE_VALUE = [Total Estimate]
VAR __VALUE_TO_COMPARE = [Total Income]
RETURN
    IF (
        NOT ISBLANK ( __VALUE_TO_COMPARE ),
        DIVIDE ( __BASELINE_VALUE - __VALUE_TO_COMPARE, __BASELINE_VALUE )
    )

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

It should be [Total Estimate]-[Total Income], not [Total Income]-[Total Estimate], modify the formula like this:

% Invoiced =
VAR __BASELINE_VALUE = [Total Estimate]
VAR __VALUE_TO_COMPARE = [Total Income]
RETURN
    IF (
        NOT ISBLANK ( __VALUE_TO_COMPARE ),
        DIVIDE ( __BASELINE_VALUE - __VALUE_TO_COMPARE, __BASELINE_VALUE )
    )

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you @v-yanjiang-msft 

I also added the -1 before the IF statement so that it shows the leftover %, this worked perfectly. 

amitchandak
Super User
Super User

@Anonymous , try like

 

% Invoiced = 
VAR __BASELINE_VALUE = [Total Estimate]
VAR __VALUE_TO_COMPARE = [Total Income]
RETURN
	1- IF(
		NOT ISBLANK(__VALUE_TO_COMPARE),
		DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
	)
Anonymous
Not applicable

Hi @amitchandak 

Unfotunately it went to 192.49% 

KyleAdam_0-1646229254011.png

I wanted it to have the remainder percentage so 7.51%, I probably should've said remainder instead of flipping, that's my bad. 

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.