Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Everyone,
I need automating slicer for year where selection need to change based on data on the page. Can anyone give logic for this. as per the requirement below slicer need to select year based on data. This year slicer is calnder table where min = year(today())-2 and Max= Year(Today()). Next year slicer will have 2024 but we will need to select it based on entire page.
Hello,
One way I've found to do this is to move whichever field is the many in the one-to-many relationship into the slicer as well, under 'Calendar'[Year]. Hopefully that makes sense and is what you're looking for.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
I want to auto select the year based on table data
What does that mean?
Any feedback at all on my proposed solution (or more concretely spelling out what you're looking for) would be helpful.
Proud to be a Super User! | |
We will go to slicer to select year manually to see data for that year. If we get new year in the slicer, it should automatically select year in slicer not manually by us.
Let me try this a different way.
It's 2023 right now. What years should show in your data right now?
It'll be 2024 next year. What years should show in your data next year?
(I'm trying to get you to explain what you're trying to accomplish in English, not in Power BI speak.)
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |