3 Replies Latest reply on Dec 13, 2017 1:44 PM by Shinichiro Murakami

    Select N weeks parameter to show YoY by week comparison

    Daniel Chandler

      Hello!,

       

      This is my first thread! Please, see my attached workbook. I'm trying to solve a YoY comparison (Current year vs. Last year) by week using a parameter (Last N weeks) to control how many weeks appear in the chart, based on the MAX Week of the MAX Year or current year, in this case it's week 48 of 2017, as you will see in the image:

       

      Approach.PNG

       

      My approach right now isn't doing the job because, as you could've seen, the parameter shows the last 6 weeks based on MAX Week available in the DB, when it should've only shown data for week 43 to 48 (True/False rows in the last image)

       

      Parameter is using this calculation: LAST() < [Last N weeks]

       

      Parameter uses this configuration:

      Parameter.PNG

       

      The right solution is:

      1. Chart should show last 2 years for the YoY comparsion and weeks to be shown in the chart (parameter) has to be controlled by the MAX Week of the LATEST Year in the Database.

       

      Intended_solution.PNG

       

      Thanks in advance.