cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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.

2 ACCEPTED SOLUTIONS
Community Champion

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

Community Champion

@jurgenvd

```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

10 REPLIES 10
Resident Rockstar

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

Helper I

Hi Siva,

that's correct,

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

Thanks

Community Champion

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

Helper I

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

Community Champion

@jurgenvd

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

Regards
Zubair

Helper I

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

Community Champion

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

Regards
Zubair

Helper I

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 !

Community Champion

@jurgenvd

```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

Helper I

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

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors