Question

chart dimension changes and adjusts the date dynamically on the choice of filter

  • 17 June 2022
  • 1 reply
  • 11 views

My requirement is a line chart where X-axis is plotted with week(six weeks) and Y-axis is a measure. Now the week is put up as a dashboard filter, where choosing on a particular week(say week 10), then the weeks that’s displayed on the x-axis should have the previous six weeks’ data(wk5 - wk10). 

 

Could you please help me with any posts with such a requirement?


1 reply

One option is to:

  • Set your week filter to “less than or equal to” the week selected
  • Sort your data in descending order by week
  • Toggle on the “Limit Displayed Rows” setting on the line chart visual setting it to show the first 6 rows only

I think that would work for any data set up. Depending on your data structure, you may be able to code a more elegant solution in the LookML.

Reply