Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I would like to add multiple date slicers to a page that has one bar graph and have them control the graph independently.
Basically, two groups of control: One doing previous xx days filtering (either pulldown or radio buttons) and the other doing a typical begin/end slider. Two groups will be synced so if one group changes, the other slicer would change to reflect it. If the date slider (bottom one) is set at something that's not available in the past xx days control, the past xx days control will be unselected. Here is a mockup to add clarity. Thanks!
Hi @dougeefresh ,
According to your description, you could create a table as slicers, then create a flag measure and apply it into filter. the following formula to create :
Step1: Enter slicer table
Step2: Create a flag measure
flag =
VAR _diff =
DATEDIFF ( MAX ( 'table'[Date] ), TODAY (), DAY )
RETURN
IF(ISFILTERED(slicer[Slicer]),SWITCH (
SELECTEDVALUE ( 'slicer'[Slicer] ),
"Past 7 days",
IF ( _diff <= 7 && _diff >= 0, 1 ),
"Past 30 days",
IF ( _diff <= 30 && _diff >= 0, 1 ),
"Past 60 days",
IF ( _diff <= 60 && _diff >= 0, 1 )
),1
)
Step3: Apply the flag measure into filter
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@dougeefresh , As far as my experiments in the past, I doubt you can control range filter-based another slicer like this.
But create a measure like this and use as a visual level filter as not blank
measure =
Switch(true() ,
selectedvalue(slicer[slicer]) = "Last 7 days" , if(max(Date[Date]) >=Today() -7 && max(Date[Date])<=today(),1, blank())
// add others,
blank()
)
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |