Forum Discussion

user2134_'s avatar
user2134_
Microsoft Employee
3 years ago

How to get difference between two columns using matrix visual

I have a table with treatment and control values, now I am creating a matrix by pivoting at Treatment and Control values. But I am not sure how to get difference between these columns. We have the option in PowerBI to get the Column totals, but how to get the difference?
I have used these in Matix:
Columns: Category
Values: A, B, C

Sample Data:

CategoryABC
Treatment123
Treatment123
Treatment123
Treatment123
Treatment123
Control123
Control123
Control123
Control123


Expected:

 TreatmentControlDelta
A541
B1082
C15123



4 Replies

  • user2134_'s avatar
    user2134_
    Microsoft Employee

    Beacause of confidentiality I cannot share it. But you can use that sample data

  • user2134_'s avatar
    user2134_
    Microsoft Employee

    Here is the visual which is matix. To get this visual, you just have to enable the option under Values section