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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
stags14
New Member

Dynamically change slicer

I have a slicer that contains a list of vaues ranging from 1 to 13. These values represents periods in the financial calandar. 

 

When a report opens, I want to default to the current period being selected in the slicer.  I already have a date table that has a column that indicates what the current period is. The hard part appears to be dynamically changing what is selected in the slicer. 

 

How do you dynamically change what is selected in a slicer? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I don't think this is supported but you could do something like create a calculated column, where you would compute the current period as 1, and then the second as 2, then 3, 4, ..., 13. Then put that column as a slicer on your page and select 1 and publish it like that. If a month is a financial period then the calculated column could be something like:
MonthOffset =Datediff(Today() - << your date >>, Today(), MONTH)

 

Hence, the slicer is not selected dynamically (always 1), but the page is always filtered on current period when you open the report.

 

 

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@stags14,

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Default-Behavior-Date-Filter-to-Most-Recent/td-p/235337

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I don't think this is supported but you could do something like create a calculated column, where you would compute the current period as 1, and then the second as 2, then 3, 4, ..., 13. Then put that column as a slicer on your page and select 1 and publish it like that. If a month is a financial period then the calculated column could be something like:
MonthOffset =Datediff(Today() - << your date >>, Today(), MONTH)

 

Hence, the slicer is not selected dynamically (always 1), but the page is always filtered on current period when you open the report.

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.