Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

$field as a quoted literal - how to?

How would you make $Field a part of a function as a quoted literal?

Function($Field) doesn't return expected results however, function(fieldname) does. $Field is used as the only dimmension in the table.

$Field contains all available fieldnames. I would like function to deal with $Field content as values i.e. actual fieldname string.

Tried concat function =concat('['& $Field & ']',',') it didn't help, any ideas?

1 Reply
kuba_michalik
Partner - Specialist
Partner - Specialist

I don't think so. There are ways to return a string containing a field name, but I can't find any that would make this string be treated as code (field name, in this case). Dollar sign expansion sort of works... but dollar sign expansion expressions are oblivious to the chart dimensions. However, if selecting the field for which you want the expression to calculate is OK, this would work: Function($(=Only($Field))). The function would calculate correctly only if a single value in $Field is selected.