Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Can i create a dynamic dimension in a qliksense table which is partially made up of a variable value?
e.g. if i have a variable (vSelected) which allows the user to select one of the following options:
and then have a single column in a static table which is set to display the dimension called 'PreviousDay_Field1', 'PreviousMonth_Field1', 'PreviousYear_Field1' etc
can i make the dimension dynamic e.g. '$(vSelected)_Field1', so the dimension shown is dependent on the selection made in the variable input box by the user?
I will need this across many columns so cant make the '_Field1' element of the field name part of the variable.
e.g if the customer selects Previous Year, I will need to apply logic to the whole table to show:
PreviousYear_Field1
PreviousYear_Field2
PreviousYear_Field3
if they select PreviousMonth i will want to show:
PreviousMonth_Field1
PreviousMonth_Field2
PreviousMonth_Field3
etc
Are you sure that the variable holds exactly what you are expecting?
What happens if you try to generate the string
='TableName.$(vSelected)_Field1'
does it return what you expect it to?
Is vSelected a string value or a variable that is expected to return a string based on functions?
Thanks so much for the quick response Vegar, unfortunately i tried that. I should add this table is qualified so i tried to use
=[TableName.$(vSelected)_Field1]
but I'm getting null values ( i get real values when i hard code the vSelected value)
Are you sure that the variable holds exactly what you are expecting?
What happens if you try to generate the string
='TableName.$(vSelected)_Field1'
does it return what you expect it to?
Is vSelected a string value or a variable that is expected to return a string based on functions?
The variable is set based on the result of a Pick function, I was missing the '=' in my variable setting...!
Thanks again Vegar, you helped me figure out my mistake. All working now