Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have data with this structure:
And I would like to show this in Power BI:
How can I achieve this?
The idea is to have some slicers to select the two years to compare (so I could choose 2019 vs 2022 or 2020 vs 2023, etc)
Solved! Go to Solution.
Hi, @zervino
You can try the following methods.
In the Power Query-Select the first two columns-Unpivot other column:
Measure:
Minyear value = Var _minyear=CALCULATE(MIN('Table'[Year]),ALLSELECTED('Table'[Year]))
Return
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Year]=_minyear&&[Attribute]=SELECTEDVALUE('Table'[Attribute])))
Maxyear value = Var _maxyear=CALCULATE(Max('Table'[Year]),ALLSELECTED('Table'[Year]))
Return
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Year]=_maxyear&&[Attribute]=SELECTEDVALUE('Table'[Attribute])))
YOY = [Maxyear value]-[Minyear value]
YOY% = [YOY]/[Maxyear value]
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, that works perfect.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
84 | |
65 | |
62 | |
55 |
User | Count |
---|---|
172 | |
108 | |
105 | |
71 | |
70 |