I've recently been asked to build a page where the user can select one of their 8 KPI's and see the KPI chart split 6 times by country. I wasn't able to use a trellis because each chart had a complex expression for colouring the bar charts based on targets loaded from a spreadsheet and written into variables.
I used a variable as a Calculated dimension to show only rows for that country in the chart e.g.
=$(vDimCountryTimeSpan(1))
The variable code is:
if($(=$(vCountryDIM_Picker($1))),$(vTimeSpanMonthYear),Null())
I was then able to get the charts working correctly, and all I had to do was copy and paste the chart and edit the dimension parameter from 1-6.
However, in setting up the background colour for KPI objects, or the colours for the bar charts and lines from targets, and several other places depending on the type of charts, I had to make several edits to update the number for that charts country.
My idea request is for Qlik to create a new Chart local variable e.g.vChartLocalVar, as a single place to store a value, and then refer to that $(vChartLocalVar) in expressions within the chart.
IS this possible and of use to anyone else?