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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 6 | |
| 6 |