Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a matrix in power BI Desktop like the following one (real data deleted due to confidentiality reasons):
To build this table I used the following DAX:
Solved! Go to Solution.
Hi @antongg7 ,
You could try below measure:-
CurrentYearValue =
CALCULATE(
[Valores P&L Cuenta Explotación],
FILTER(
ALL('DIM Calendar'),
'DIM Calendar'[Year] = SELECTEDVALUE(Years[Value])
)
)
PreviousYearValue =
CALCULATE(
[Valores P&L Cuenta Explotación],
FILTER(
ALL('DIM Calendar'),
'DIM Calendar'[Year] = SELECTEDVALUE(Years[Value]) - 1
)
)
PercentChange =
IF(
ISBLANK([PreviousYearValue]),
BLANK(),
DIVIDE([CurrentYearValue] - [PreviousYearValue], [PreviousYearValue], 0)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @antongg7 ,
You could try below measure:-
CurrentYearValue =
CALCULATE(
[Valores P&L Cuenta Explotación],
FILTER(
ALL('DIM Calendar'),
'DIM Calendar'[Year] = SELECTEDVALUE(Years[Value])
)
)
PreviousYearValue =
CALCULATE(
[Valores P&L Cuenta Explotación],
FILTER(
ALL('DIM Calendar'),
'DIM Calendar'[Year] = SELECTEDVALUE(Years[Value]) - 1
)
)
PercentChange =
IF(
ISBLANK([PreviousYearValue]),
BLANK(),
DIVIDE([CurrentYearValue] - [PreviousYearValue], [PreviousYearValue], 0)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin