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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Percent difference calculation using different values

Hi there!

 

I am looking for some help with my dax:

I have a very simplified dataset and I want to calculate the percent difference (V2-V1)/V1 . I would like a way to calculate the percent difference based off of different reference values: AVGstatic, AVGmonthly (calculated). I would only like to have 1 column called 'Percent difference' , but I don't know how to filter the table properly. 

 

Thank you for your help.

 

Corey

 

OUTPUT: 

 

AVGstatic = 6

 

TABLE 1:

DateBananas EatenPercent difference
1.1.202460
1.2.2024717%
1.3.2024833%

 

AVGMonthly = 10

TABLE 1:

DateBananas EatenPercent difference
1.1.20246-40%
1.2.20247-30%
1.3.20248-20%
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can try dax like below:

 

M1 =
VAR cur =
    IF (
        NOT ISBLANK ( SELECTEDVALUE ( slice[tag] ) ),
        SELECTEDVALUE ( slice[value] ),
        BLANK ()
    )
RETURN
    ( MAX ( 'Table'[Bananas Eaten] ) - cur ) / cur

 

vkongfanfmsft_0-1704876132690.png

 

Best Regards,
Adamk Kong

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

You can try dax like below:

 

M1 =
VAR cur =
    IF (
        NOT ISBLANK ( SELECTEDVALUE ( slice[tag] ) ),
        SELECTEDVALUE ( slice[value] ),
        BLANK ()
    )
RETURN
    ( MAX ( 'Table'[Bananas Eaten] ) - cur ) / cur

 

vkongfanfmsft_0-1704876132690.png

 

Best Regards,
Adamk Kong

 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.