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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jurgenvd
Helper I
Helper I

measure difference in percentage from same measures

Hi All

 

I'm stuck with my Matrix, can someone help me.

 

I have 3 measures

 

Incidents opened

Incidents closed

Average incidents in open state  per week

 

next to those measures i have a table with the week numbers.

 

I'm stuck with calculating the % difference between 2 weeks, like shown below.

 

Basicaly, i will have to see the difference in % from the same measures.


Is it possible.Capture.PNG

2 ACCEPTED SOLUTIONS

HI @jurgenvd

 

Try adding this MEASURE.

Bascially for each row it is intended to give you the [Incidents Opened]....For total....the difference between max and highest week

 

 

Measure =
IF (
    HASONEVALUE ( TableName[WeekNumber] ),
    [Incidents Opened],
    CALCULATE (
        [Incidents Opened],
        FILTER (
            ALLSELECTED ( TableName[WeekNumber] ),
            TableName[WeekNumber] = MAX ( TableName[WeekNumber] )
        )
    )
        - CALCULATE (
            [Incidents Opened],
            FILTER (
                ALLSELECTED ( TableName[WeekNumber] ),
                TableName[WeekNumber] = MIN ( TableName[WeekNumber] )
            )
        )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

@jurgenvd

 

Please give this a shot

 

Measure =
IF (
    HASONEVALUE ( TableName[WeekNumber] ),
    [Incidents Opened],
    ROUND (
        (
            CALCULATE (
                [Incidents Opened],
                FILTER (
                    ALLSELECTED ( TableName[WeekNumber] ),
                    TableName[WeekNumber] = MAX ( TableName[WeekNumber] )
                )
            )
                / CALCULATE (
                    [Incidents Opened],
                    FILTER (
                        ALLSELECTED ( TableName[WeekNumber] ),
                        TableName[WeekNumber] = MIN ( TableName[WeekNumber] )
                    )
                )
                - 1
        )
            * 100,
        1
    )
        & "%"
)

Regards
Zubair

Please try my custom visuals

View solution in original post

10 REPLIES 10
SivaMani
Resident Rockstar
Resident Rockstar

Would you like to see % diff in the total row?

Hi Siva, 

 

that's correct,

 

With quick measures there are possibilities but not when it's coming from same data source.

 

Thanks

HI @jurgenvd

 

Try adding this MEASURE.

Bascially for each row it is intended to give you the [Incidents Opened]....For total....the difference between max and highest week

 

 

Measure =
IF (
    HASONEVALUE ( TableName[WeekNumber] ),
    [Incidents Opened],
    CALCULATE (
        [Incidents Opened],
        FILTER (
            ALLSELECTED ( TableName[WeekNumber] ),
            TableName[WeekNumber] = MAX ( TableName[WeekNumber] )
        )
    )
        - CALCULATE (
            [Incidents Opened],
            FILTER (
                ALLSELECTED ( TableName[WeekNumber] ),
                TableName[WeekNumber] = MIN ( TableName[WeekNumber] )
            )
        )
)

Regards
Zubair

Please try my custom visuals

Hi @Zubair_Muhammad

 

Thank you for your help.

 

I have tested the measure that you made for me, but it's just returning the same values as "incidents opened"

 

Capture.PNG

@jurgenvd

 

Even for the total row??.... Total row is not visible in your picture

 

Could you share your file?


Regards
Zubair

Please try my custom visuals

@Zubair_Muhammad

 

I'm stuck with show the outcome in percentage. i searched a long time but don't find the correct solution.

Any idea how to represent this?

 

Many Thanks

Hi @jurgenvd

 

Do you want that the same MEASURE should show NUMBERS in ROWS and PERCENTAGE in ROW TOTAL???


Regards
Zubair

Please try my custom visuals

hi @Zubair_Muhammad

 

Yes correct.

 

I would like to have the same but now reflected in percentage.

 

so the % should be the increase between the 2 reported weeks. 

 

Many thanks !

@jurgenvd

 

Please give this a shot

 

Measure =
IF (
    HASONEVALUE ( TableName[WeekNumber] ),
    [Incidents Opened],
    ROUND (
        (
            CALCULATE (
                [Incidents Opened],
                FILTER (
                    ALLSELECTED ( TableName[WeekNumber] ),
                    TableName[WeekNumber] = MAX ( TableName[WeekNumber] )
                )
            )
                / CALCULATE (
                    [Incidents Opened],
                    FILTER (
                        ALLSELECTED ( TableName[WeekNumber] ),
                        TableName[WeekNumber] = MIN ( TableName[WeekNumber] )
                    )
                )
                - 1
        )
            * 100,
        1
    )
        & "%"
)

Regards
Zubair

Please try my custom visuals

@Zubair_Muhammad

 

Thanks for the Big Help,

 

you are right, when i added the totals it was showing the difference, now just find out how to represent the number in Percentages.

 

Many Thanks

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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