Forum Discussion

llealsantos's avatar
llealsantos
Frequent Visitor
1 year ago
Solved

Power BI: Dynamic Date Slicer Behavior

Hey all, I have a date slicer that filters the last 14 months using a calculated column in the calendar table. When the "Last 14 Months" is selected on the slicer, it correctly displays only the las...
  • Ritaf1983's avatar
    1 year ago

    Hi llealsantos 

    If I understood your question correctly, one way to achieve this is by modifying or adding a calculated column in your calendar table.

    The column should return "Last 14 Months" if the date falls within the last 14 months. Otherwise, it should return the year of the date.

    Then, you can use this new column as the slicer instead of the date column. This way, when "Last 14 Months" is selected, it will filter accordingly, and when it's deselected, it will show years instead.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly