5 Replies Latest reply: Jul 11, 2017 4:31 AM by ajeet tomer RSS

    Dimension switcher and limiter

    Simon Touyet

      Hi all,


      I have created a master fiscal calendar with the following fields:

      • CalendarYear
      • CalendarQuarter
      • CalendarMonth
      • CalendarWeek
      • CalendarDate


      I have been working for a while on a way to show the last 10 items of a series. I took the CalendarWeek dimension as an example: i wanted to show on a chart the last 10 CalendarWeeks based on the most recent CalendarDate uploaded as part of my data. I therefore included the below set analysis in my formula



      As you can see, it tells the chart to only list the last 10 weeks by telling it to take the range of dates between the most recent date and the previous 70 dates to get the 10 weeks range desired.


      Works beautifully!

      However, I now would like to be able, at the push of a button, to switch through the dimensions and that it continues to show the last 10 entries of any dimension. I searched for extensions that would allow me to do that but I am at a dead-end.


      Let me clarify what i would like to achieve:

      - Have a series of buttons or other controls that would change the dimension of all charts so if you press the "Yearly" button, it switches all charts dimensions to CalendarYear; press the "Quarterly" button, it switches all charts dimensions to CalendarQuarter; etc. etc.

      - Have a Variable listen to the chosen dimension and changes the number of days if should use to get the range of data. It would choose 70 days if you choose the "weekly" dimension, 300 if you choose the "Monthly" dimension. I can then change my set analysis above to include the newly created variable. This part should be simple enough... i think.


      Does anybody know how these 3 can be achieved? Having the controls, the change in the charts and the listening variable?