Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a Variable as Dimension

Hi all

I have a dashboard which is updated annually. This dashboard has 5 tabs with 2-4 charts each.

The dimensions used are as follows (years will be updated per year):

Product Category

Sub Product Category

2015 Revenue

2016 Revenue

2015 Cost

2016 Cost

...

...

The data comes from an Excel template with no date column, and the file is provided by an external vendor annually. I would like to find out if there is a way to update all my calculations/chart dimensions quickly, instead of opening each chart up and changing the dimension/expression values.

I've found the "Expression Overview" function which allows me to do a "Find/Replace" across the entire dashboard, which I have tried as a workaround.

Alternatively, I have tried to create variables for each dimension (e.g vCurrYearRevenue as =[2016 Revenue]), which I am thinking of putting these variables directly into each chart as a dimension, or use as expression. This will allow me to simply go into the Variable Overview editor and change the variable definition on a one-time basis annually.

However, I am facing difficulty when trying to use the variable as a dimension in the chart. For example, I have a bar chart, and I'm planning to use vProductCategory as the dimension. However, this is not working no matter what combination I've put into the Calculated Dimension section. I've tried vProductCategory, $(vProductCategory), =$(='['&vProductCategory&']') all to no avail.

Any advise will be greatly appreciated.

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi,

For example (look attached file)

Field(dimension): ProductCategory

Variable: ProductCategory

Dimension: =$(vProductCategory)


Regards,

Andrey

View solution in original post

2 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

For example (look attached file)

Field(dimension): ProductCategory

Variable: ProductCategory

Dimension: =$(vProductCategory)


Regards,

Andrey

Not applicable
Author

Thanks. I figured out that I was configuring my Variable a "=ProductCategory". Removing the "=" solved the issue