Fisc | 20-21 | 21-22 | 22-23 | 23-24 | 24-25 |
---|---|---|---|---|---|
A | 10 | 15 | 30 | 25 | 5 |
B | 100 | 85 | 35 | 15 | 30 |
this is the initial table imported from Excel in Power Bi :
Table name : prog
I want to create a measure to calculate the difference between rows to display a table like the Following:
20-21 | 21-22 | 22-23 | 23-24 | 24-25 | |
---|---|---|---|---|---|
Diff B-A | 90 | 60 | 5 | -10 | 25 |
this is what i used but doesn’t work :
_DiffB-A =
CALCULATE(
SUM('prog'[B]) - SUM('prog'[A]),
ALL('prog'[Fisc])
)
I tried to use the index but all solution are adding a new column and not a row.
Thanks.
New contributor
BM78 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.