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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.