Forum Discussion
Filter Slicer from Measure values
Hello eveyone,
I have 3 tables. Calendar, Sale and Parameter.
Parameter has values ranging from 1-24, which are the number on months I want to go back.
I am trying to filter a slicer which has dates from the calendar table, based on the month of the sales date.
I have taken the last sale date and then gotten the min and max dates in 2 different measures, using the parameter value.
Now I want to dynamically filter a slicer which has dates from the calendar table, with above mentioned min and max dates.
For e.g.
Last Sale Date is 17th May 2023.
Selected Parameter Value is 3.
Max Calendar Date will be 30th April 2023
Min Calendar Date will be 1st Feb 2023.
E.g. 2
Last Sale Date is 12th Feb 2023.
Selected Parameter Value is 5.
Max Calendar Date will be 31st Jan 2023.
Min Calendar Date will be 1st Sep 2022.
Now I want to filter the slicer value to have dates between 1st Feb 2023 and 30th April 2023.
This will be dynamic based on the parameter values.
I have tried using the relative date slicer, but that works based on the current date of the system.
I also cannot use the sale date in the relative date slicer either, as it is a fact table.
Please let me know if you need any further information.
17 Replies
- johnt75Super User
You need another measure like
Date is visible = IF ( SELECTEDVALUE ( 'Date'[Date] ) IN CALENDAR ( [Min date], [Max date] ), 1 )and use that as a visual level filter on the slicer.
- visheshjainImpactful Individual
- johnt75Super User
what does it show if you click on "see details" ?