2 Replies Latest reply: Apr 28, 2016 6:17 AM by Silvia Cicoira RSS

    RangeSum with ValueList()

    Silvia Cicoira

      Hello everybody,

      I'm having some problems with the function ValueList() with a RangeSum(above(...)), in particular I'm using the ValueList in order to set colors in my bar chart.


      The code is:


      if(ValueList('New usersi','Existing users', 'Inactive')='New users'

        ,(count({$<result={'ok'}, flag={'Battesimo'}>} DISTINCT user_id2))

        ,if(ValueList('New users','Existing users', 'Inactive')='Existing users'

          ,(count({$<result={'ok'}, flag={'Totale giocate'}>} DISTINCT user_id2))- count({$<result={'ok'}, flag={'Battesimo'}>} DISTINCT user_id2)

            ,if (ValueList('New users','Existing users', 'Inactive')= 'Inactive'

              ,(rangesum(above(count({$<result={'ok'}, flag={'Battesimo'}>} DISTINCT user_id2),1,rowno()-1) )

        - (

                    count({$<result={'ok'}, flag={'Totale giocate'}>} DISTINCT user_id2)


                    count({$<result={'ok'}, flag={'Battesimo'}>} DISTINCT user_id2)






      With dimensions:

      - Weekstart(link_date)

      - ValueList('New users','Existing users', 'Inactive').

      I tried the code without the ValueList (using 3 different measures and only "Weekstart(link_date)" as dimension) and it's working, however with the valuelist the measure in the third IF is not working.


      Thank you