2 Replies Latest reply on Jan 17, 2018 4:05 AM by Leonard Boes

    Sheet Swapping by number of filtered items

    Leonard Boes

      Hello Community,
      I have already read many threads about sheet swapping but could yet not find a solution for my specific problem: based on the number of filtered items, I want to display differently styled sheets in my dashboard.

       

      In my Dashboard, I have a filter with which the user can select among companies whose data is to be displayed with one chart for each company. Depending on the number of chosen companies, I either want to present my charts underneath each other (like in the first picture) or next to each other (like in the second picture).  

      rows.png

      clmns.JPG

      My idea is to use a calculated field to count the number of items that were selected in the filter. Therefore I use the following code:

       

      IF COUNTD([Filter]) = 1 THEN 'one'

      ELSEIF COUNTD([Filter]) = 2 THEN 'two'

      ELSEIF COUNTD([Filter]) = 3 THEN 'three'

      ELSEIF COUNTD([Filter]) = 4 THEN 'four'

      ELSEIF COUNTD([Filter]) = 5 THEN 'five'

      ...

      END

       

      But I have no idea how to go on from this point. Do you have any ideas? Thanks in advance for your help