Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |