Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
How do I compare any 2 years data i.e. year 2018 data with 2021 data having multiple datasets on single page? I have got the dax query working for year over year comparison but not working for flexible year comparison. If there is a solution please reply .
Solved! Go to Solution.
Hi, @CecilMathew ;
You could create other two date table as slicer, then create a measure to calculate the difference.
1.create two table.
slicer1 = VALUES('Table'[date])
slicer1 = VALUES('Table'[date])
2.create a measure.
differ =
var _slicer1=CALCULATE(SUM([value]),FILTER(ALL('Table'),YEAR([date])=YEAR( MAX('slicer1'[date]))))
var _slicer2=CALCULATE(SUM([value]),FILTER(ALL('Table'),YEAR([date])=YEAR( MAX('slicer2'[date]))))
return DIVIDE(_slicer2-_slicer1,_slicer1)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @CecilMathew ;
You could create other two date table as slicer, then create a measure to calculate the difference.
1.create two table.
slicer1 = VALUES('Table'[date])
slicer1 = VALUES('Table'[date])
2.create a measure.
differ =
var _slicer1=CALCULATE(SUM([value]),FILTER(ALL('Table'),YEAR([date])=YEAR( MAX('slicer1'[date]))))
var _slicer2=CALCULATE(SUM([value]),FILTER(ALL('Table'),YEAR([date])=YEAR( MAX('slicer2'[date]))))
return DIVIDE(_slicer2-_slicer1,_slicer1)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@CecilMathew , Check if these two slicers approaches can help you
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
88 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |