2 Replies Latest reply: Aug 21, 2012 7:30 AM by Pallavi Swarup RSS

    Expression in Set Analysis using the Dimension



      I have been trying to write a simple Set Expression to check the increase in the number of  distinct users on a daily basis.I have attached a Qlikview file where I want to do whats done in Exp2 in a more simplified way. I tried writting Exp1 but it does not work, so I was wondering I was doing wrong.


      Exp1: (does not work)

      COUNT(DISTINCT {<Day = {"<=$(Only(Day))"}>} User)



      Exp2: (Works, but I don't want to hard code the Day and Day range could increase.

      if(Day = 1, Count({<Day={'<=1'}>}TOTAL DISTINCT User),

           if(Day = 2, Count({<Day={'<=2'}>}TOTAL DISTINCT User),

                if(Day = 3, Count({<Day={'<=3'}>}TOTAL DISTINCT User),

                     if(Day = 4, Count({<Day={'<=4'}>}TOTAL DISTINCT User),

                          if(Day = 5, Count({<Day={'<=5'}>}TOTAL DISTINCT User)


      Thanks in Advance!