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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All, I need help with this case. It has already been discussed, however the solution did not turn out to not fit my needs.
Pls, check link below:
https://community.fabric.microsoft.com/t5/Desktop/Current-year-and-previous-year-while-the-slicer-is...
How can I show a bar chart for the current year and previous years while the slicer is set to filter only the current year?
How can I create a bar chart in Power BI that displays values for the current year and the previous year, when the slicer is set to filter only the current year?
- I created a bar chart and added years to it, and I also created a slicer for the years. I want the chart to display data starting from the selected year (for example, 2022) and include data for 2 previous years and as well.
After selecting any year on the slicer, I want to see that year as well as the two previous years on the chart.
- I also have data for future years, such as 2023 and 2024, but I don't want to display them initially. I want to see only the selected year, for example, 2024, and the previous year, 2023, after selecting 2024 on the slicer.
I have one main slicer that I use on all the report pages (they are synchronized) on the page with the chart and also other visualizations.
On the left I applied previosu solution (marked with a red star)
on the right I have a different visualization based on Total measure:
Total Sales Amount = SUM(Sales[Amount]) and filtered by categories.
I would like this pie chart to show only 2023. At the same time, the chart on the left (marked in red) should show the current year, i.e., for example, 2023 and 2022 - at which point only one year is marked on the slier.
Many thx for help.
Hi @johnt75,
Thank you for your answer but it doesn't fit my problem. 😞
The solution you provided sets back the date by, say, 2 years or the equivalent of 24 months. I need to filter the current year and aslo two years back with the help of selecting one year on the slicer. I also need to be able to filter months.
I think you should be able to add a separate slicer based on the month name and that would also work with the previous years.
Hi @johnt75
thank you for your answer unfortunately this solution does not fit my needs, because I can not filter the data by months, when I select on the slicer for example the fifth month of 2024 this presenting solution subtracts the equivalent of 2 years = 24 months.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 108 | |
| 39 | |
| 33 | |
| 25 |