Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Greetings Power Bi-ians, (is that a thing?)
It's been 2 months and since I'm fairly new to Power BI, I would really appreciate your help in solving my doubt/error which has been making me go in circles.
I work in the F&B industry, so comparison of sales, transactions, storewise, current and prior is one the many aspects we look at.
- We currently have 2 years of data with which we created a dashboard (Jan 2018-Dec 2020).
- Current year and prior year sales are placed as two boxes in a slide.
- In default selection, "Previous" shows the correct value.
- When we select 1 year period, say Jan-Dec 18/19/20, it shows prior year sales correctly.
- The issue arises when we select more than a year. If we select Oct 19 - Dec 20, "Previous" shows Jan 18-Dec 19 figure.
- On selecting 2 years (Jan 19-Dec 20), it shows Jan 18- Dec 19 figure.
Below is the DAX measure I've used:
1. if you don't want the users to specify a date range then only give them a slicer with one date (change the slicer type)
2. no other changes required. Unless you want to dive into the intricacies of Year Over Year To Date.
User | Count |
---|---|
9 | |
8 | |
5 | |
4 | |
3 |