Hi Klaus,
If the type is limited to X & Y, then create a calculate formula with a filter of x or y.
e.g.
x = Calculate (sum(value),Type = "X")
y = Calculate (sum(value),Type = "y")
To calculate the difference, create a measure Diff = xy
I assume that your data is as simple as you presented but if your data is much complicated, please explain further including the limitations that you are facing.
Regards,
Rd

Rd 3nidad
Senior Finance Analyst

Original Message:
Sent: Dec 06, 2022 06:37 AM
From: Klaus T
Subject: Difference of two columns in a matrix
Hi
This is my table in PBI:
Date 
Custormer 
Product 
Type 
value 
06122022 
Alpha 
1A 
X 
500 
06122022 
Alpha 
1A 
Y 
600 
06122022 
Beta 
1A 
X 
1000 
06122022 
Beta 
1A 
Y 
1800 
And I want result in a matrix
Matrix 




Alpha 

X 
Y 
Difference 

1A 
500 
600 
100 
Beta 





1A 
1000 
1800 
800 





Filter on date 



How can I make a measure that can calculate the difference?

Klaus T
