Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mrainey18
Contributor

Field Value Array

Is there a way to put a list of Distinct field values into a variable array?

I am trying to create a nested For each next loops where the loops loop through each distinct field value. 

1 Solution

Accepted Solutions
MVP
MVP

Re: Field Value Array

May be do this with FieldValue() and FieldValueCount() function

For i = 1 to FieldValueCount('FieldName')

     LET vVar = $(vVar) & FieldValue('FieldName', $(i));

NEXT i

Something along these lines

1 Reply
MVP
MVP

Re: Field Value Array

May be do this with FieldValue() and FieldValueCount() function

For i = 1 to FieldValueCount('FieldName')

     LET vVar = $(vVar) & FieldValue('FieldName', $(i));

NEXT i

Something along these lines