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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to show percentage difference between two columns in Matrix

I'm new to Pbi. I'm trying to replicate an Excel report to Pbi. Excel pivot table was able to produce the 3 column as the difference by showing values as % Difference between Avg of Client Interaction and Avg of RS Case. I want to achieve the same output on the Total column in Pbi Matrix, is it possible?

 

cha120621_0-1654017390051.png  

cha120621_1-1654017434088.png

 

Thanks in advance.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

please place this measure in your matrix instead of the column

Average Case Age (days) =
VAR AverageDays =
    AVERAGE ( TableName[Case Age (days)] )
VAR AverageClient =
    CALCULATE (
        AVERAGE ( TableName[Case Age (days)] ),
        TableName[ColumnName] = "Client Interaction"
    )
VAR AverageRS =
    CALCULATE (
        AVERAGE ( TableName[Case Age (days)] ),
        TableName[ColumnName] = "RS Cars"
    )
RETURN
    IF (
        HASONEVALUE ( TableName[ColumnName] ),
        AverageDays,
        DIVIDE ( AverageRS - AverageClient, AverageClient )
    )

 

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 

please place this measure in your matrix instead of the column

Average Case Age (days) =
VAR AverageDays =
    AVERAGE ( TableName[Case Age (days)] )
VAR AverageClient =
    CALCULATE (
        AVERAGE ( TableName[Case Age (days)] ),
        TableName[ColumnName] = "Client Interaction"
    )
VAR AverageRS =
    CALCULATE (
        AVERAGE ( TableName[Case Age (days)] ),
        TableName[ColumnName] = "RS Cars"
    )
RETURN
    IF (
        HASONEVALUE ( TableName[ColumnName] ),
        AverageDays,
        DIVIDE ( AverageRS - AverageClient, AverageClient )
    )

 

Helpful resources

Announcements
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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.