Forum Discussion
Dynamic Filter
Hi, Anonymous
I am glad to help you.
Before I help you with your problem I would like to ask what is the purpose of the two dynamic Slicers you need to create?
In your description, the Dynamic Slicer contains dates up to today, but the DateTable you are requesting to display contains data only up to Today - 3 days. So what actually is the purpose of the Dynamic Slicer to filter the data?
Based on your description, I have made a simple example, hope it will help you.
First you need to create two measures, StartDate and EndDate:
StartDate =
VAR Today = TODAY()
RETURN Today - 10EndDate =
VAR Today = TODAY()
RETURN Today - 3
Then you need to create another Measure for displaying the data from StartDate to EndDate:
DateTableShow =
VAR startDate = [StartDate]
VAR endDate = [EndDate]
RETURN
IF(MAX(DateTable[Date]) >= startDate && MAX(DateTable[Date]) <= endDate,1,0)
Then drag the Measure to the Filter panel and set the Measure value to 1:
For the two dynamic Slicers, you can do a New Table for each:
StartDateTable =
CALENDAR(
TODAY() - 10,
TODAY()
)EndDateTable =
CALENDAR(
TODAY() - 3,
TODAY()
)
Then drag the relevant fields into the fields of the Slicer visual:
The pbix file about this simple example I have posted below, I hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.