Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello! What I want to do is to plot one year's worth of data vs another year on a line chart.
My data is set up as a Value per Month. So in the Month column you have dates, assigned to the first day of each month (so February 2022 -> 01/02/2022). Value would be a decimal number.
Ideally, I'd like to be able to choose any two specific years to compare, but if that would be too complicated, just choosing one year, and the previous year is automatically displayed, is fine too.
I was thinking I'd have two parameters, where you can select a year, and two measures that select the values based on the parameters. Not sure how to make that work though, I am still confused between the parameters in Power BI and the parameters in Power Query.
Hi @DaxPadawan
Thanks for reaching out to us.
My suggestion is that you can create two separate date tables and put them into different slicers. Alternatively, you can just create a date table and then use measure to get the year before the selected date, the function can use edate() and so on, EDATE function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@DaxPadawan , I think you need this
Power BI Abstract Thesis: How to use two Date/Period slicers
Other TI can help
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Hello @amitchandak! Thank you for this. If I understand correctly, the approach is to to create a separate Date table and use that for one of the slicers?
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |