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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LotteLaugesen
Helper V
Helper V

Dynamic filter depending on another filter

Hi 

 

I would like to have a date filter showing the last 7 or 14 days depending on another filter like this:

LotteLaugesen_0-1651152257200.png

Is it possible?

 

BR

Lotte

1 ACCEPTED SOLUTION
LotteLaugesen
Helper V
Helper V

I have find a way to solve it 🙂

Include Date = IF(SELECTEDVALUE(Weeks[Weeks]) = 1 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 7,1,IF(SELECTEDVALUE(Weeks[Weeks]) = 2 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 14,1,0))
 
Where IndexDay is days from today
and then I just put a filter on Date slicer saying that Include Date should be 1

 

View solution in original post

3 REPLIES 3
LotteLaugesen
Helper V
Helper V

I have find a way to solve it 🙂

Include Date = IF(SELECTEDVALUE(Weeks[Weeks]) = 1 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 7,1,IF(SELECTEDVALUE(Weeks[Weeks]) = 2 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 14,1,0))
 
Where IndexDay is days from today
and then I just put a filter on Date slicer saying that Include Date should be 1

 
amitchandak
Super User
Super User

@LotteLaugesen , Create a measure

 

countrows(filter('Date', Date[Date] <= Today()  && Date[Date] >= Today() - (selectedvalue(Table[Number])*7) ))

 

and check the values is not blank in the visual level filter of the slicer

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi amitchandak

 

It doesn't seem to work - it doesn't matter if I select 1 or 2 week the measure is 1. 
If it worked how could I then use it as a filter for the date slicer?

LotteLaugesen_0-1651219857446.png

 



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.