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
piv3z
New Member

Measure % change of values from two matrixes with different periodes through slicer

Hello, I want to measure the difference between values in two different matrixes. They have a slicer which defines the periode of time of registered data.


The values are counted.

 

 

help powerbi.JPG

 

 

File is here

 

Thank you

1 ACCEPTED SOLUTION

Thank you.

 

I am blocked at calendar. I want to measure the % of difference between outputs of periode 1 (from 01.01.2017 to 31.12.2017) compared to periode 2 (from 01.01.2018 to 31.12.2018).

 

measure =
VAR select1 =
ALLSELECTED ( Tabelle1[Bezugsmonat].[Date] )
VAR select2 =
ALLSELECTED ( Calendar(date(2018;1;1);date(2018;12;31)))
RETURN
CALCULATE (
SUM ( Tabelle1[idemploy] );
FILTER ( ALLSELECTED ( Tabelle1 ); [Bezugsmonat].[Date] IN select1 );
VALUES ( Tabelle1[idpart1] )
)
/ CALCULATE (
SUM ( Tabelle1[idemploy] );
FILTER ( ALLSELECTED ( Tabelle1 ); [Bezugsmonat].[Date] IN select2 );
VALUES ( Tabelle1[idpart1] )
)

I updated the file aswell.

 

 

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @piv3z ,

Power bi not support to cache history visual data based on your selection, you need to add another slicer with unrelated date field.

Measure =
VAR select =
    ALLSELECTED ( Table[Date] )
VAR select2 =
    ALLSELECTED ( Calendar[Date] )
RETURN
    CALCULATE (
        SUM ( Table[amount] ),
        FILTER ( ALLSELECTED ( Table ), [Date] IN select ),
        VALUES ( Table[idpart] )
    )
        / CALCULATE (
            SUM ( Table[amount] ),
            FILTER ( ALLSELECTED ( Table ), [Date] IN select2 ),
            VALUES ( Table[idpart] )
        )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you.

 

I am blocked at calendar. I want to measure the % of difference between outputs of periode 1 (from 01.01.2017 to 31.12.2017) compared to periode 2 (from 01.01.2018 to 31.12.2018).

 

measure =
VAR select1 =
ALLSELECTED ( Tabelle1[Bezugsmonat].[Date] )
VAR select2 =
ALLSELECTED ( Calendar(date(2018;1;1);date(2018;12;31)))
RETURN
CALCULATE (
SUM ( Tabelle1[idemploy] );
FILTER ( ALLSELECTED ( Tabelle1 ); [Bezugsmonat].[Date] IN select1 );
VALUES ( Tabelle1[idpart1] )
)
/ CALCULATE (
SUM ( Tabelle1[idemploy] );
FILTER ( ALLSELECTED ( Tabelle1 ); [Bezugsmonat].[Date] IN select2 );
VALUES ( Tabelle1[idpart1] )
)

I updated the file aswell.

 

 

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.