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.
I have a table called Sales and Calender.
When the year is selected from the slicer it should show the selected year values, if not should show the default current year. For example, if I select 2021, it should show us 2021. If I am not select any year from the slicer it should show me 2023 since 2023 is the current year.
Thank you Anthony,
Here is the DAX quey.
Selected Year =
IF (
ISFILTERED (Calender[date_id].[Year]),
YEAR(DATE(MAX(Calender[date_id].[YEAR]),1, 1)),
YEAR(TODAY())
)
I use this DAX, it was wroking fine but now its not working. Here is the screenshoot.
So what should it be showing?
That is not how slicers work. The closest way you can get to what you want is to change the slicer to either single select, or multi select and remove the select all option. If you go the multi select route, I usually enable the CTRL selection so people don't go crazy selecting and unselecting things.
If you are looking to perform this functionality in Dax, you would need to provide a sample measure and I can help you write it.
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 |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |