Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable Issue

I have table being loaded in to Qlikview app with a list of KPI numbers and description of the calculation.

With the following code

=MaxString({<Indicator_Number={1}>} Formula)

it will display the value num(sum([ED.4 Hour Non Breach Flag])/sum(ED.Count),'##.#%')

What I would like it to be able to do is to display the value of this calculation as a percentage (e.g. 92.4%) when I use it in a chart?

I also need this to be always showing as a value even if the Indicator_Number either has no selections on it or a selection other than "1" has been made..

Many thanks

1 Solution

Accepted Solutions
tracysmart
Creator II
Creator II

Hi Rhiannon

you are just missing the equals in the expression.

=$(=MaxString({<Indicator_Number={1}>}Formula

Don't put the equals in the variable definition as this will evaluate outside of your chart and will not expand with the dimensionality of your chart.

View solution in original post

13 Replies
vishsaggi
Champion III
Champion III

Can you share a sample app and expected output for this please ?

Not applicable
Author

     Attached is an example.  I'd like the Using Variable chart to bring back the same result as the Using Formula Chart so that even when Indicator_number is either 2 or not selected then the % performance shows in the graph.

At the moment, I can only get the values to show in the chart when Indicator_Number = 1

Does that make sense?

vishsaggi
Champion III
Champion III

Can you explain what does this mean ?

"so that even when Indicator_number is either 2 or not selected then the % performance shows in the graph."

Not applicable
Author

Ok - So I have gotten a little further with this but still having issues.

I need to be able to get the script below to show as a percentage value in a chart:

=$(MaxString({<Indicator_Number={1}>}Formula))


However, when the above script is put in to the expression definition, it comes out as '-'


In a text box, without the initial $( it shows as this:

num(sum([ED.4 Hour Non Breach Flag])/sum(ED.Count),'##.#%')


This is the text, but I want it to work as a calculation so that in a chart $(MaxString({<Indicator_Number={1}>}Formula)) returns as  the following:

I feel like I am missing something. Any ideas?  I would also add a new copy of the test QVW file, but there doesn't seem to be a "upload attachment option"

Not applicable
Author

Ok - So I have gotten a little further with this but still having issues.

I need to be able to get the script below to show as a percentage value in a chart:

=$(MaxString({<Indicator_Number={1}>}Formula))


However, when the above script is put in to the expression definition, it comes out as '-'


In a text box, without the initial $( it shows as this:

num(sum([ED.4 Hour Non Breach Flag])/sum(ED.Count),'##.#%')


This is the text, but I want it to work as a calculation so that in a chart $(MaxString({<Indicator_Number={1}>}Formula)) returns as  the following:

I feel like I am missing something. Any ideas?  I would also add a new copy of the test QVW file, but there doesn't seem to be a "upload attachment option"

vishsaggi
Champion III
Champion III

I have to look into it bear with me. If you have a new attachment click on Use advance editor when you are in reply mode -> Use advance editor is located on top left corner of reply window, please attach the latest one if you have it.

Not applicable
Author

Attached is a revised copy of the application

vishsaggi
Champion III
Champion III

Check this if this is what you looking for ?

tracysmart
Creator II
Creator II

Hi Rhiannon

you are just missing the equals in the expression.

=$(=MaxString({<Indicator_Number={1}>}Formula

Don't put the equals in the variable definition as this will evaluate outside of your chart and will not expand with the dimensionality of your chart.