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
Anonymous
Not applicable

Set a default slicer selection to current year, month and week

Hi All,

I am trying to implement a solution to fix the slicers to default selection of current year, month and week. But i didn't find any appropriate solutions. Please can anyone help me with the soultion.

I have already tried creating calculated column and replace current month with "current month text" it is working as expected but business don't like the solution. Can anyone suggest any other methods.

4 REPLIES 4
hashtag_pete
Helper V
Helper V

Hi @Anonymous 

in the Timeline Slicer Business Apps – Microsoft AppSource you have such an option. 

The Timeline Slicer uses quite a lot of space of your canvas, but it is nevertheless very user friendly and I found that all consumers like it a lot. 

2022-01-20 08_42_35-Window.png

I hope this helps? if so, kudos and solution marker are appreciated

 

best

hashtag_pete

amitchandak
Super User
Super User

@Anonymous , As of now power bi do not support use of function to initialize the slicer so you have use column like

 

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

 

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" ,
Date([Date])= eomonth(Today(),0),"This Month" ,
[Month]
)

 

 

start week = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
end date= 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

Week Type = Switch( True(),
[start week]<=Today() && [end date]>=Today(),"This Week" ,
[start week]<=Today()-7 && [end date]>=Today()-7,"Last Week" ,
[Week Name]
)

 

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

Anonymous
Not applicable

@amitchandak Thanks for the response. I have already created this solution but this solution is not acceped by business. Can you tell me if there any other way to achive this.

@Anonymous , You can check custom visuals. I doubt of another way

https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

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.