Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor II
Partner - Contributor II

RangeSum with ValueList()

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

2 Replies

Not exactely sure what you want to calculate.

But remember that Above() is limited to the column segment (without using TOTAL), so not sure how this is supposed to work given the ValueList() not really linked to your data model, thus returning the same record set for each dimensional value.

If you can post a small sample QVW and your expected results, maybe this helps to understand your issue.

Partner - Contributor II
Partner - Contributor II

Hi ,

that's an example of my problem, the second graph has to look like the first one, but the ValueList creates the issue.