Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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 @Anonymous ,
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 @Anonymous ,
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |