11 Replies Latest reply: Jul 25, 2013 2:17 PM by Danilo Torres RSS

    Regarding radio button

      Dear All,

      Can anyone suggest me how to use radiobutton for a particlar chart in qlikview. As........................


      if we have two option in radiobutton:1) Report 1 2) Report 2

      If we select 'Report 1' from radiobutton then it will display chart no 1 and if we select 'Report 2' it will display chart no 2.

      is there any macro or something else......................

      Plz suggest me ASAP

        • Regarding radio button


          In Qlik View we don't have Radio Button. But you can make it using list box.

          Steps 1:

          Make List box and the load you fields and the go to Properties and then "Presentation" tab.

          Then select "Selection Style Override" -->"LED"

          Then Goto "Caption" --> un check the "Show Caption" Option.

          Now your list box will look like "Radio Button".

          Step 2:

          Declare one variable in the qv document. in my sample i have created "GetShowValues"

          Step 3:

          Write the below Macro in your qv document.

          Sub GetVal
          Set Val=ActiveDocument.Fields("Name").GetSelectedValues
          Val1 = Val.Item(0).Text
          ActiveDocument.Variables("GetShowValues").SetContent Val1, True
          End Sub

          Step 4:

          Goto "Setting" --> Document Properties-->Macro tab.

          Then in the "Field Event Triggers" "Select your List box Filed"

          Then in the right hand side select "OnSelect" event you can select the macro "GetVal"

          Step 5:

          Goto Chart1 Properties -->Layout--->Show Conditional -->

          Give the =GetShowValues='Report1'.

          Step 6:

          Goto Chart2 Properties -->Layout--->Show Conditional -->

          Give the =GetShowValues='Report2'.

          Now according to your selection in the list box the chart will be displayed.

          See the attached sample document.





            • Regarding radio button

              Hi Saran,

              I got ur test qv file and apply it at my original application

              it will work thanks a lot for ur support


              Neetu Singh

                • Re: Regarding radio button
                  m m

                  what if you had to do exact same thing but show and hide data within a straight table. I have date 1 and date 2 as criteria.


                  1) i will create new inline table with 2 fields: date 1 and date 2

                  2) create listbox and turn it into checkbox, link it to newly created table field called Date1 & Date 2


                  How can I now show and hide within list box date1 data or date 2 data, based on above selection.

              • Regarding radio button


                You can archive this with out using macro also.

                Change the following settings in the chart Properties.

                Chart 1: "Show Conditional" Put like this "=getfieldselections ( Name )='Report' "

                Chart 2 :"Show Conditional" Put like this "=getfieldselections ( Name )='Repor2' "

                This will also works.



                • Re: Regarding radio button
                  Danilo Torres

                  I´m using LED style for selection on my list. The problem is that the labels are greater than the visible area, so the qlikview puts the char # in all list's options. How can i force the list to show all chars?