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

compare 2 versions of dataset: difference between 2 measures based on seperate 2 filters

Hello,

 

I want to show the difference between 2 versions of a dataset. I created 2 measures and 2 filters for this. 1 filter has interaction with only 1 measures. This works fine, but the delta between these 2 measures is not working. Also not when I change the interactions with the filters. 

I tried for the delta measure 2 options:

1. Measure 1 - Measure 2

2. Full 2 measures in one measure subtracting one of the other: 

 CALCULATE(SUM(Source[Amount]);

FILTER(Source;Source[Versions]
= SELECTEDVALUE('Main Version'[Version])))

CALCULATE(SUM(Source[Amount]);

FILTER(Source;Source[Versions]
= SELECTEDVALUE('Second Version'[Version])))
 
 

 

 

Measure 1: CALCULATE(SUM(Source[Amount]);

FILTER(Source;Source[Versions]
= SELECTEDVALUE('Main Version'[Version])))

Measure 2: 

CALCULATE(SUM(Source[Amount]);

FILTER(Source;Source[Versions]
= SELECTEDVALUE('Second Version'[Version])))

 

For the filters I created 2 reference tables: 

1. Main Version with a column 'Version' with all versions in them. This table is linked to Table 'Source'. 

Filter 'Main Version' contains this column Version from table Main Version

2. Second Version with a column 'Version' with all versions in them. This table is linked to Table 'Source'. 

Filter 'Second Version' contains this column Version from table Second Version

 

Any ideas how to solve showing the delta?

2versions1.PNG

2 ACCEPTED SOLUTIONS

@Anonymous,

 

Please change the measure with formula below and try again:

MainVersion =
CALCULATE (
    SUM ( 'Dataleversie'[Waarde] );
    FILTER (
        ALLEXCEPT ( 'Dataleversie'; 'Main Version' );
        Dateleversie[Version] = 'Main Version'[Mainversionselected]
    )
)

Regards,

Jimmy Tao

View solution in original post

@Anonymous,

 

Could you share a sample pbix for further analysis?

 

Regards,

Jimmy Tao

View solution in original post

14 REPLIES 14

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.