4 Replies Latest reply: Oct 27, 2017 1:50 PM by Russell Glenn RSS

    General filter pane selection coding Qlik Sense

    Russell Glenn

      Hi everyone,

       

      I am wondering if I can code something in the Qlik. I am trying to say that if our product segment dimension is selected via a filter pane and one of our product lines is selected, then be rgb(0,0,0).

       

      I am wondering if there is a way to say if any part of a dimension (product line) is selected then do something

       

      if([Product Segment]='Shoes' and [Product Line]='XXXX', rgb(0,0,0))

       

      The expression works if I put in a specific product line name like "running" or "walking", but I am trying to code it to work if ANY product line is selected.

       

      Is there a general term I can put in for the XXXX above to mean if any product line is selected?

       

      Thanks in advance.

        • Re: General filter pane selection coding Qlik Sense
          Felip Drechsler

          Hi Russel,

          What you can do is use the GetSelectedCount([Product Line]) statement, something like:

           

          if([Product Segment]='Shoes' and GetSelectedCount([Product Line])>0, green(),red())

           

          For my example, ive used the following code:

          data:

          Load * Inline

          [

          Date,Product Segment,Product Line,Sales

              01/01/2017,Shoes,Running,111

              02/01/2017,Shoes,Hiking,531

              03/01/2017,Bike,Mountain bike,1013

              02/01/2017,Bike,Urban,693

              04/01/2017,Equipment,Bow,12

              05/01/2017,Equipment,Bat,111

          ];

           

           

          And got this (selecting shoes only)

          Sample.png

           

          And got this (selecting shoes and whatever selection on Product Line):

          Sample.png