Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PallaviR
Frequent Visitor

Setting Slicer default value to current year and month

Dear Team,

Is there a way to set default slicer selection as Current Month and Year dynamically.
For example, if the current month is march 2022, then slicer should have default selection as 'March' for Calendar Month Slicer and '2022' as Calendar Year Slicer. And in April month, slicer should auto change to 'April' in the month slicer. User should also be able to select rest of the months and past years.

currently we are able to achieve this default functionality by following the below article, but with hardcoded text like "Default" instead of exact month.
https://gorilla.bi/power-bi/set-default-slicer-value/

But we need exact month<March> and year<2022> as default setting when user logs in.

Kindly suggest a solution for this scenario.

Thanks,
Pallavi_R

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @PallaviR ,

 

Currently, please take the solution in the blog you mentioned as a workaround since this feature is still under preview. You could vote for similar idea in Power BI Ideas or add your comments there with more details about your needs. Thanks in advance!

vcazhengmsft_0-1646896802008.png

 

Link of similar idea:

https://ideas.powerbi.com/ideas/idea/?ideaid=39ba67cf-724e-4b6c-9906-51163749f759

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

3 REPLIES 3
powerbi_zone
Frequent Visitor

Its 2024 and things have shuffled a bit .You can use the method shown in this video to achive this easily .

https://youtu.be/o-gr3XgU1mg

 

 

v-cazheng-msft
Community Support
Community Support

Hi @PallaviR ,

 

Currently, please take the solution in the blog you mentioned as a workaround since this feature is still under preview. You could vote for similar idea in Power BI Ideas or add your comments there with more details about your needs. Thanks in advance!

vcazhengmsft_0-1646896802008.png

 

Link of similar idea:

https://ideas.powerbi.com/ideas/idea/?ideaid=39ba67cf-724e-4b6c-9906-51163749f759

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

amitchandak
Super User
Super User

@PallaviR , As of now, You have to use hard-coded functionality like This month, This Year. You can log an idea

https://ideas.powerbi.com/ideas/

 

Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)

 

 

Month Type = Switch( True(),
eomonth([Date],0)= today(),"This Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors