3 Replies Latest reply: Jun 16, 2016 10:59 PM by Nhu Ngo RSS

    Toggle in Qlik Sense

    Mohammad Sarif

      Hi Friends,

      Hope you are doing good.


      I have a requirement of Toggle button.

      We need to put a toggle button in Dashboard. There would be two text Cumulative and Non Cumulative. Depending on the selection it will show either Cumulative chart or Non Cumulative chart. The calculation is only difference between two Chart.

      I could do this in Qlikview using variable however in Qlik sense I am not able to do.

      Could you please help me on this.


      Thanks in advance for your time...




        • Re: Toggle in Qlik Sense
          Gabor Tarnoczai

          Hi Mohammad,


          you can find extensions at Qlik Branch, that do the work.



          • Re: Toggle in Qlik Sense
            Bella Mae

            in a future version you will be able to create alternative dimensions


            but in the mean time you can create a makeshift cyclic group with the below


            Create an inline table in the script

            Load * inline
            Selector, Name

            This will create two new fields 'Selector' and 'Name'

            Create a master item dimension with the fields being the dimension you want the user to be able to select

            if(Selector='a',[Field A],
            if(Selector='b',[Field B],
            if(Selector='c',[Field C],
            if(Selector='d',[Field D],
            if(Selector='e',[Field E],
            if(Selector='f',[Field F],
            if(Selector='g',[Field G])))))))

            Use that master item dimension as a dimension in your chart and create a filter pane with the field 'Name' from the inline table.

            Selecting a name in the filter pane will make the chart change, as there is no way to limit the selection to just one it is also wise to add a calculation condition on the chart.Calulation condition can be found under Add-ons > Data handling, I use getselectedcount(Name)=1

            • Re: Toggle in Qlik Sense



              Whether you can download Checkbox Master from Qlik branch that allows you to turn on/off variable.


              Or you can create a dummy table with 2 values, Cummulative & NonCummulative. Then in your chart expression, depends on what you select: If(GetFieldSelections(Filter)='Cummulative', <exp1>, <exp2>)


              The negative thing here is you can't switch your selection, so you have to unselect & select new one.


              But if you use the extension, it'll handle it nicely.