Forum Discussion
Current Year month as default selction, also keep
Hello All,
I have a "year month" Slicer. Every month my data gets updated and I want slicer to be auto-selected for all current year and month, but also have previous year month unselected.
I have created a calculated column as
Column = IF(MONTH(Table1[Date])=MONTH(NOW()) && YEAR(Table1[Date])=YEAR(NOW()),"current month",MONTH(Table1[Date]))
and kept in under visual filter, it shows only current year and month, the previous year month doesn't appear at all.
I want current year month autoselected and previous unselected
Thanks,
Aditya
4 Replies
- amitchandak
Super User
One of the hack is to have calendar till today only.
Also refer
https://community.powerbi.com/t5/Desktop/Slicer-to-select-current-month-as-default/m-p/887473
https://community.powerbi.com/t5/Desktop/Current-Year-Slicer/m-p/704786
- AnonymousNot applicable
I have created calculated column and selected current year, but other years doesn't appear in the drop-down,
My requirement is : I want current year month to be selected but other year month should be unselected.
- amitchandak
Super User
Can you share a screenshot, what is happening vs what is expected?
Also refer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
https://www.youtube.com/watch?v=lkHFpmA4SJ4
- v-juanli-msft
Community Support
Hi Anonymous
Calculated column is static, you could create a measure which changes dynamically every year.
Measure = IF(YEAR(MAX(Sheet1[date]))=YEAR(TODAY()),1,0)If you want to aotu select the slicer dynamically, it seems impossible.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.