Reply
Highlighted
Member
Posts: 65
Registered: ‎08-07-2018
Accepted Solution

Calculate delta filtering 2 times on a column that has a possible versions in it

Hello,

 

I have a dataset 'Source'  that has several variables such as KPI name, period and the value and also a version. I want to compare 2 versions and show the delta between them by have 2 filters in the top to select a version.

I have loaded the source and then created 2 other tables with all possible versions:

 

Versie1.PNG

 

I have managed to create both filters and have independent visuals to show the values of the filter, but the delta is not possible:

Versie2.PNG

 

No. 1: Using measures like 

CALCULATE (SUM (Source[Waarde]);
    FILTER (ALLEXCEPT ( 'Source'; 'MainVersion' );
        Source[Versie] = MainVersion[MainVersionSelected]
    ))

  the delta is calculated but I want to be able to filter also on, KPI name, month and year and that is not possible this way.

 

No. 2:  Using measures like 

SUMX(FILTER(Source; Source[Versie] = MainVersion[MainVersionSelected]);Source[Waarde])

     the visuals show the correct figure but the delta is not calculated.

 

Included pbix:

 

PBIX link

 

Any ideas?

 

 

 

 

 

 

 


Accepted Solutions
Community Support Team
Posts: 7,693
Registered: ‎05-02-2017

Re: Calculate delta filtering 2 times on a column that has a possible versions in it

Hi @MartijnNL,

 

Try this one, please. We only need to clear the unwanted filters.

Measure =
CALCULATE ( SUM ( Source[Waarde] ), ALL ( SecondVersion ) )
    - CALCULATE ( SUM ( Source[Waarde] ), ALL ( MainVersion ) )

Calculate-delta-filtering-2-times-on-a-column-that-has-a-possible-versions-in-it

 

Best Regards,
Dale

Community Support Team _ Dale
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


All Replies
Community Support Team
Posts: 7,693
Registered: ‎05-02-2017

Re: Calculate delta filtering 2 times on a column that has a possible versions in it

Hi @MartijnNL,

 

Try this one, please. We only need to clear the unwanted filters.

Measure =
CALCULATE ( SUM ( Source[Waarde] ), ALL ( SecondVersion ) )
    - CALCULATE ( SUM ( Source[Waarde] ), ALL ( MainVersion ) )

Calculate-delta-filtering-2-times-on-a-column-that-has-a-possible-versions-in-it

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Member
Posts: 65
Registered: ‎08-07-2018

Re: Calculate delta filtering 2 times on a column that has a possible versions in it

@v-jiascu-msft Thank you this is exactly what I was looking for. The measure seems to be so simpleSmiley Happy I will study the ALL functions a bit more to understand how to use them in the future. Thanks again.