Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I hope this one's simple . . .
Using a consistent naming convention, I wish to dynamically concatenate a fieldname and have it be recognized by Qlik Sense as a dimension in an object.
In my Data Model, I have several tables similar to:
ThingX:
x.id | x.name | x.date | x.type |
---|---|---|---|
12345 | name1 | 12-01-2016 | type1 |
23456 | name2 | 12-01-2016 | type2 |
34567 | name3 | 12-02-2016 | type2 |
Sample list of tablenames and fieldnames would be:
ThingX | ThingY | ThingZ |
---|---|---|
x.id | y.id | z.id |
x.name | y.name | z.name |
x.date | y.date | z.date |
x.type | y.type | z.type |
Also a variable: vDim
Based on selection I wish to create $vDim & '.id' (name, date, type, etc) in order to produce a straight table or filter box with the associated data - as if I had typed x.id as dimension, it would display 12345, 23456, 34567 accordingly
To support this, I've added a table:
Dim
Load * [Inline
ThingX, ThingY, ThingZ
x, y, z];
Also a variable: vDim
User selects a dimension ( $(vDim) - enabled in a Branch extension)
In a straight table and filter box I've tried:
'$(vDim)'&'.id'
$(vDim)&.id
='$(vDim)'&'.id' - produces ThingX.id literal (great for use in Labels/Titles)
=$(vDim)&'.id' - this produces x.id in the table, but only 'x.id' literal - Qlik doesn't recognize that it's the field name.
I've realized I'll need the = sign it looks like, but it just doesn't seem to recognize that it's the name of the field and to treat it accordingly.
Thanks!
Depending on your context, you probably need one of these two for x.id
[$(vDim).id]
$(=[$(vDim).id])
And similarly for the other fields.
That's awesome - the first one worked . . . for like 3 seconds, then when I clicked on another dimension, it stopped and refuses to display again!!! MOODY APP!!!
Ideas on that?
The problem was the Branch Extension
The first solution worked - thanks again!!