Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dynamic dimension

hi,

I am trying to create a dynamic dimension based on the possible values of a field. I know how to get the possible values of my field (concat(myfield, ', ')). if i put this in a if like if(concat(myfield, ', ') = 'KBS'), 'hello', 'Bye') it also works fine. I tested this in a textbox. so far so good. if i try this in a pivot table for a dynamic dimension I always get an error. my dynamic dimension looks like this: if(concat(myfield, ', ') = 'KBS', field1, field2)

may someone help me?

regards,

MT

3 Replies
Or
MVP
MVP

concat() is an aggregation function, if memory serves, which means you can't use it directly in your dimension formula. You'd have to wrap it in an aggr() function.

Not applicable
Author

and how would that look?

Or
MVP
MVP

Without knowing what your datamodel looks like,

if(aggr(concat(myfield, ', '),SomeDimension) = 'KBS', field1, field2)

Where SomeDimension is a dimension that will not interfere with your aggregation (if no such dimension exists, you can create something like "Load 1 as SomeDimension" in your script and leave it loose, which should work). There's probably a neater way of doing that, though.