Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I want to join two slicers in the same page. I have a table with column 'date' and I have in another table a column 'slicer_date'. First column has dates like '20/12/2018' and column 'slicer_date' has 'L3M', 'L9M'...
I have one slicer with ( 'L3M', 'L9M','LY'...) and another slicer with two exact dates(range of dates).
I want that when I select L3M(Last three months) the second slicer represent the exact dates that the first slicer choose.
For example, if I choose L3M, the second slicer automaticaly represent From: 1/10/2021 to: 31/12/2021.
Is it possible? Thanks.
Solved! Go to Solution.
Hi, @Anonymous
You can try the following methods.
Measure:
Measure =
VAR _1 =
TODAY ()
VAR _Startdate =
SWITCH (
TRUE (),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L3M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 4, 1 ),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L6M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 7, 1 ),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L9M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 10, 1 )
)
VAR _Enddate =
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) - 1
RETURN
IF (
SELECTEDVALUE ( 'Date'[Date] ) >= _Startdate
&& SELECTEDVALUE ( 'Date'[Date] ) <= _Enddate,
1,
0
)
Create a slicer based on the Date table. Put Measure into Filters, set to equal 1.
Does this match your desired outcome?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
You can try the following methods.
Measure:
Measure =
VAR _1 =
TODAY ()
VAR _Startdate =
SWITCH (
TRUE (),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L3M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 4, 1 ),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L6M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 7, 1 ),
SELECTEDVALUE ( slicer_date[slicer_date] ) = "L9M", DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 10, 1 )
)
VAR _Enddate =
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) - 1
RETURN
IF (
SELECTEDVALUE ( 'Date'[Date] ) >= _Startdate
&& SELECTEDVALUE ( 'Date'[Date] ) <= _Enddate,
1,
0
)
Create a slicer based on the Date table. Put Measure into Filters, set to equal 1.
Does this match your desired outcome?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
IF you choose L6M the second slicer shows 1/10/2021 to: 31/12/2021 or 1/6/2021 to: 31/12/2021??
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Sorry, the second one. Edited!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 120 | |
| 95 | |
| 70 | |
| 69 | |
| 65 |