6 Replies Latest reply: Oct 24, 2017 6:07 AM by Mikel Murugarren Añorbe RSS

    Show customized value in filter pane

    siddharth soam

      Hi all,


      I have a column quarter in my data with the following values.






      Now I want two filter panes

      1. Current quarter

      2. Previous quarter


      Values should be displayed as follows:


                Current                             Previous

      values   Q2                                      Q1

      values   Q3                                     Q2,Q1

      values   Q4                                      Q3,Q2,Q1



      Kindly help me implement this in qliksense

        • Re: Show customized value in filter pane
          omar bensalem

          stalwar1, do you have an idea on how to do this?

          when we do as an expression:

          = rangesum(above(count(Quarters),1,RowNo()))


          we'll have the number of all above quarters of the current quarter;

          to see all these quarters, I tried this:

          =Concat(aggr(Only({$<Quarters = p({1<Quarters={$(=rangesum(above(count(Quarters),1,RowNo())))}>})>} Quarters ),Quarters),',')

          Can you see what I'm doing wrong? And is there another way to do it?

          Maybe within the script?

            • Re: Show customized value in filter pane
              Matteo Pietrucci


              in the filter panel i'm not sure that you can use Concat function; for resolve this case, i think that you must use script like this (for example):



              MAPPING LOAD * INLINE [

              QUARTER , PREVIOUS

              Q2 , Q1

              Q3 , "Q2,Q1"

              Q4 , "Q3,Q2,Q1"







              QUARTER AS CURRENT,

              ApplyMap('MAP_QUARTER',QUARTER,'#ND#') AS PREVIOUS

              Resident QUARTER_TMP;




              In the fillters, you must write this aggregation:


              1)  =aggr(Only({1<CURRENT-={'Q1'}>}CURRENT),CURRENT)
              2) =aggr(Only({1<CURRENT-={'Q1'}>}PREVIOUS),PREVIOUS)


              The final result is:



              • Re: Show customized value in filter pane
                Sunny Talwar

                I am not clear as to what the OP is looking to get... may be a sample of raw data with expected output may help understand better

              • Re: Show customized value in filter pane
                Mikel Murugarren Añorbe

                Hi Siddharth soam
                I can think of a way to solve your problem, it is in the data file of load, with the functions Previous (when the previous value) and the peek (it returns the value of a record)

                In the Script would be something similar to:


                Load *, If([]=Previous([])+1 ,


                    Resident Table1 ;