Skip to main content

I've got a Year filter and charts with Months from the selected year. I'd like to have a user select a year from the year filter, and then only have specific months from each year appear in the charts. The specific months would differ by year.

 

For example, if a user selects the '2015' year then 'September 2015' and 'December 2015' would appear, but if they select '2022', then the 'July 2022' and 'October 2022' months would appear.

 

How could I do this?

1 answer
  1. Jul 30, 2022, 11:19 AM

    Hi @Ken White​ 

    You could achieve this using a parameter and some calculations

    Hi @Ken White​ You could achieve this using a parameter and some calculationsSelected year? =[Order Year]=[Year]Returns true when the year is the one we've chosen in the parameter. Filter to true.image.pngSelected year? =

    [Order Year]=[Year]

    Returns true when the year is the one we've chosen in the parameter. Filter to true.

    Relevant month? =

    ([Order Year]=2018 AND (MONTH([Order Date]) = 1 OR MONTH([Order Date]) = 2))

    OR

    ([Order Year]=2019 AND (MONTH([Order Date]) = 3 OR MONTH([Order Date]) = 4))

    OR

    ([Order Year]=2020 AND (MONTH([Order Date]) = 5 OR MONTH([Order Date]) = 6))

    OR

    ([Order Year]=2021)

    Above illustrates a calculation that returns true for the months you want to show for each year. Again filter to true.

    Post back and let me know if this helps!

    Workbook attached - you'll see that I've set my parameter to match the order date years (i.e. refresh on workbook open) so that it matches the dimension and acts like a filter would.

    Ta, Steve.

0/9000