4 Replies Latest reply: Oct 11, 2017 4:41 AM by Mike Slottje RSS

    Flag based on revenue

    Mike Slottje

      Hi experts,


      for our sales team, I've plotted our sales locations on a GeoMap in Qlik Sense.

      The size of the dots are based on the revenue in the current year and these dots turn green if the revenue > 0.

      If the revenue < 0, the dot turns red.


      To help our sales team, I want to make a flag which is based on the revenue of the current year.

      I tried to make a filter in a worksheet with the following set analysis expression:

      if(SUM({<Year = {$(=Year(Today()))}>}[Nett Amount new EUR])>0,'Green','Red')

      Unfortunately, Qlik shows me an invalid dimension as outcome in the filter pane.

      Should I change the expression or should I create a flag in the load script?

      If I should create this flag in the load script, how should the expression look like?

      Your help is appreciated!


        • Re: Flag based on revenue
          Devarasu R


          the expression looks fine. do u wanted to apply this expression in filter pane? if so then u have use like below kind expression

          =Aggr(if(SUM({<Year = {$(=Year(Today()))}>}[Nett Amount new EUR])>0,'Green','Red'),[Nett Amount new EUR] )

          P.S: aggr(expression, dimensions)



            • Re: Flag based on revenue
              Mike Slottje

              Yes, I want to apply this expression in a filter pane, so our sales team can filter on red and green dots.

              The Aggr function did solve my problem, so many thanks for that!


              Could you shortly explain what the Aggr function exactly does in this example?

              And does this expression also work within the load script, so I can create this flag as a dimension?