5 Replies Latest reply: Feb 3, 2016 2:06 PM by Sunny Talwar RSS

    Show dimension ignore selection

      I have two charts, the 1st chart follows the selected dimension and the second chart's dimension will be other than selection

       

      Below is the data, for some reason, the figure of quarterly is not the sum of monthly, and also yearly

       

      The first chart will show the selected PERIOD_TYPE, and default to be monthly

      On second chart, if the selected type is 'Monthly', it will show quarterly data 2016-Q1 and 2016-Q2; if the selected type is 'Quarterly', it will show the yearly figure.  The problem is that if I selected 'Monthly', Qlik will filter out all 'Quarterly' dimension and thus show nothing.

       

      PERIOD_TYPEPERIOD_NAMEPERIOD_VALUE
      Monthly2016-011
      Monthly2016-022
      Monthly2016-033
      Monthly2016-044
      Monthly2016-055
      Monthly2016-066
      Quarterly2016-Q18
      Quarterly2016-Q220
      Yearly201630

       

      Load * Inline

      [

      PERIOD_TYPE,PERIOD_NAME,PERIOD_VALUE

      'Monthly','2016-01',1

      'Monthly','2016-02',2

      'Monthly','2016-03',3

      'Monthly','2016-04',4

      'Monthly','2016-05',5

      'Monthly','2016-06',6

      'Quarterly','2016-Q1',8

      'Quarterly','2016-Q2',20

      'Yearly','2016',30

      ];

       

      Filter Pane

      Dimension

      PERIOD_TYPE

       

      Bar Chart 1

      Dimension:

      if (getSelectedCount(PERIOD_TYPE) = 1, PERIOD_NAME, if (PERIOD_TYPE = 'Monthly', PERIOD_NAME))

      Measure:

      Sum(PERIOD_VALUE)

       

      Bar Chart 2

      Dimension:

      if (GetFieldSelections(PERIOD_TYPE) = 'Monthly',

          if (PERIOD_TYPE = 'Quarterly', PERIOD_NAME),

          if (PERIOD_TYPE = 'Yearly', PERIOD_NAME))

      Measure:

      Sum(PERIOD_VALUE)