Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Please anyone suggest,What is the exact use of valuelist() and valueLoop() in qlikview.

What is the exact use of valuelist() and valueLoop() in qlikview.

can we replace this functionality or calculated dimension with any generic approach .

please suggest.

2 Replies
Highlighted
Not applicable

Re: Please anyone suggest,What is the exact use of valuelist() and valueLoop() in qlikview.

For example, create a calculated dimension in a straight table:

=ValueList('KPI1','KPI2')

Then, an expression like

=pick(match(

               ValueList('KPI1','KPI2')

          ,'KPI1','KPI2')

,sum(FIELD)

,count(FIELD)

)

You'll get a dimension with two value, KPI1 and KPI2. To check in your expression, which is the current dimension value, you'll need to repeat the Valuelist() function as used in the dimension again in the expression. (Above can also be written as

=if( ValueList('KPI1','KPI2') = 'KPI1', sum(FIELD),

if( ValueList('KPI1','KPI2') = 'KPI2', count(FIELD) ))

So you can create a dimension on the fly in a chart which is not based on a field in your data model (I think that's why its called synthetic).

Valuelist() just uses the values you are listing as arguments, valueloop creates the dimension values based on start, end and step values.

Highlighted
MVP
MVP

Re: Please anyone suggest,What is the exact use of valuelist() and valueLoop() in qlikview.