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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

If I select 2nd slicer then slicer should select 1st slicer automatically

Hi Team,
I have below slicer , here is my ask
if i select 4 weeks ,then slicer should show only 4weeks. 
if i select 8 weeks in slicer then slicer shoud select 4weeks also automatically 
if i select 12weeks then it should select 4 weeks and 8 weeks automatically 
if i select 16weeks then it should select 4 weeks and 8 weeks and 12weeks automatically
if i select >16 weeks all the slicers i.e 4weeks , 8 weeks , 12weeks , 16weeks and >16weeks ..
please help me on this 

Bajigntrr_0-1720081877691.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Anonymous 

I create a table:

vyohuamsft_0-1720166051158.png

 

Then create a calculated column and use the following dax:

Week Group = 
SWITCH(
    TRUE(),
    'Table'[Weeks] <= 4, "4 weeks",
    'Table'[Weeks] <= 8, "8 weeks",
    'Table'[Weeks] <= 12, "12 weeks",
    'Table'[Weeks] <= 16, "16 weeks",
    'Table'[Weeks] > 16, ">16 weeks"
)

vyohuamsft_1-1720166231742.png

vyohuamsft_3-1720166253152.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi, @Anonymous 

I create a table:

vyohuamsft_0-1720166051158.png

 

Then create a calculated column and use the following dax:

Week Group = 
SWITCH(
    TRUE(),
    'Table'[Weeks] <= 4, "4 weeks",
    'Table'[Weeks] <= 8, "8 weeks",
    'Table'[Weeks] <= 12, "12 weeks",
    'Table'[Weeks] <= 16, "16 weeks",
    'Table'[Weeks] > 16, ">16 weeks"
)

vyohuamsft_1-1720166231742.png

vyohuamsft_3-1720166253152.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Uzi2019
Super User
Super User

Hi @Anonymous 

 

Try these video for custom calendar.

https://www.youtube.com/watch?v=JLupF1j49wo&t=966s

https://www.youtube.com/watch?v=8pDjbzNz1g8

https://www.youtube.com/watch?v=Xi86HHEaY_M

 

https://www.youtube.com/watch?v=hDopw1mPlrU

https://www.youtube.com/watch?v=Su1mERlwNdM

 

 

I hope above videos would help to create custom date slicer.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

Not working @amitchandak 

amitchandak
Super User
Super User

@Anonymous , You have to create a measure and then use that as a visual level filter. But it will not default the value

 

Switch( True(),

"4 Week", countrows(filter(Table, Table[Date]>= today() -28 && Table[Date] <= today() ) )

// Add other

)

 Use that as visual level filter

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors