Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Caculated variable not showing in chart...

The following will work in a textbox:

=$(='v'&'KPI_01_01_RAG')

And this will work in a chart expression:

='v' &

[KPI_Details] & '_RAG'

However,

=$(='v'& [KPI_Details] & '_RAG'

in a chart expression doesn't work.

Any ideas?

Stewart

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Keep the variables but build a big if-then-else in your expression field. All substitutions will happen before recalculating the chart, and by extension the different KPI formula's will fall into the right spots.

Once you got that working, you can consider filling a new variable with the big if-then-else in your script, based on a KPI definition table. A loop will take care of any casual additions/omissins, or will handle the KPI-spec in an external file (for example in an Excel).

Best,

Peter

View solution in original post

12 Replies
sunny_talwar

What are you trying to achieve?

Best,

Sunny

Anonymous
Not applicable
Author

Do you need a closing bracket ?

You've got =$(='v'............ but no closing bracket.

Not applicable
Author

Hi Sunindia

I am generating KPIs and one value that I need is contained in a series of variables.

Using the KPI_Details chart dimension, I was hoping to concatenate it with some text to get the correct values.

Capture.JPG

I have the variable names - but now need their values......

Ideas?


Stewart

Not applicable
Author

Just a typo - still got the same problem with closing bracket....

rubenmarin

Hi stewart, I think is because $-expanded variables are expanded before calculate the chart, not row by row, so they don't have the row value.

If you add in a chart with only one [KPI_Details] value selected, it works?

Not applicable
Author

Hi Ruben

You may be onto something - as this does work in a textbox. Single Value [KPI_Details] works without any problem.

I now have a very useful variable that I cannot get into table (with some pretty sparklelines)...... any ideas?

Stewart

rubenmarin

Probably you wouldn't like my next answer: when I did something similiar (also with pretty sparklines and gauge indicators), I made different tables, one for each KPI and each using his own variable, no dependant of dimension value.

Hope some other user give us a better option.

Not applicable
Author

Hi Ruben

Not the answer I wanted to hear - but it does give me a way forward and stops me from hitting my head on the Qlikview Brickwork....

I will be interested to see if other users have a different approach.....

Thanks

Stewart


Peter_Cammaert
Partner - Champion III
Partner - Champion III

Keep the variables but build a big if-then-else in your expression field. All substitutions will happen before recalculating the chart, and by extension the different KPI formula's will fall into the right spots.

Once you got that working, you can consider filling a new variable with the big if-then-else in your script, based on a KPI definition table. A loop will take care of any casual additions/omissins, or will handle the KPI-spec in an external file (for example in an Excel).

Best,

Peter