Forum Discussion
Date Slicer should populate the date range using start date and end date columns using other slicers
- 1 year ago
Hi mvinaykumar2003 ,
Thanks for the additional details and screenshot.I’ve tried this in my setup.
When Start_Date and End_Date are treated as text, the slicers respond correctly to Reporting_Period and Current_Prev_Month selections .
this works because Power BI treats them as categorical filters.
However, when using real date types, slicers are designed to show a continuous range and won’t dynamically reduce their range based on slicer-driven logic.
If your goal is to display the dynamic Start and End Dates:Use two text slicers (Start_Date and End_Date)
If your goal is to filter other visuals based on this dynamic range:
Please try this:
Keep a proper Date table:
DateTable = CALENDAR(DATE(2021,1,1), DATE(2025,12,31))Use measure like below to identify selected range:
IsInSelectedRange =VAR _min = CALCULATE(MIN('Table'[Start_Date]),ALLSELECTED('Table'))VAR _max = CALCULATE(MAX('Table'[End_Date]),ALLSELECTED('Table'))RETURNIF(MAX('DateTable'[Date]) >= _min &&MAX('DateTable'[Date]) <= _max,1,0)Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.Thank you.
Hi mvinaykumar2003 ,
Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries.
Otherwise, feel free to reach out for further assistance.
Thank you.