The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |