
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can i use a variable in a dimension?
Can i use a variable in a dimension so i do not have to write each dimension value for different dimensions in a chart?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use the CROSS TABLE Load in the script and convert them into meaningful data , then you could easily perform the required calculation at the Expression Level.
I have got sample data to illustrate. This may help.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
in as dimension you enter a field name, not each value of the field
you can use a variable in the form $(variable name) and in that case, the content of the varaible is used as field name


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Variable is meant to store only one ouput value. Hence I don't think you will be able to derive multiple dimension using single variable.
You can define variables for each dimension i.e. for you calculate dimension and get a control over dimension.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes we have concept like that which we're using now.
Created random 5 inline fields, passed as selections for fields to be displayed in pivot table.
used those selections via variables in our dimensions.
EX:
$(=ONLY({1<%Dim_Name = {'$(vVariable)'}>} %Dim_FieldName))
Thanks
CY


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
please post a sample of what you currently are trying to implement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All ,
Thanks for your input , probably my question was wrong..
Below is the problem statement and i am looking for a solution.
I have different columns like P1,P2,P3...P20 i.e 20 different columns. And the values in it are 1 and 0 . i want to count the number of 1's against the Primary Key.
Current i am counting it in an expression of the chart - count( distinct if(P2=1),PID); but i have to write it 20 different times for each values , i wanted to know if there is way to display it in a chart by not repeating the different values each time .
PS- I am relatively new to Qlikview and sorry if i have confused you more with my question.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use the CROSS TABLE Load in the script and convert them into meaningful data , then you could easily perform the required calculation at the Expression Level.
I have got sample data to illustrate. This may help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Chaitanya , it should work with my requirement
