
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set up variable with field column values
Hi,
I'm new to Qlik Sense and currently trying to get our first dashboards up and running.
We have a field containing a column of several different values, which I want to pass to a variable to use in different scenarios.
e.g.
Field A contains:
1
2
3
4
And I want to pass all of these values to the variable "numbers" which is defined by the following expression:
=if(vDim = 1, [Field A], if(vDim = 2,[Field B]))
Now if vDim is true the variable still doesn't show the values of Field A.
Though when I add sum() to the expression, it adds all these numbers and the variable is working.
What is the best way to set up the variable with all of the single values of Field A?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want all the values of a field shown in one expression, try CONCAT().

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want all the values of a field shown in one expression, try CONCAT().

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! I think this might help. Is there a way to avoid duplicates after concatenate?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes: CONCAT(DISTINCT [Field A], ', ')
