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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sweens78
Creator
Creator

Create a Gragh of Top Values with percentage

Hi Guys,

I doing a graphs of Top 6 which is fine but the user also want the percentages displayed.  I can do this with the relative tick box, but this will only give me the percentage of the Top 6 not the true percentage Value

For example below the 745 figure is 21.96% (which is based on top 6 )  but doing the through percentage it is 745/7036*100 = 10.5%

I want to incorporate this into graph also.

Any Ideas?

12 Replies
rubenmarin

Hi Martin, in example, if expression is Sum(Value):

Sum(Value)/Sum({<Dimension_Field={"=Rank(Sum(Value))<=6"}>} Value)

sunny_talwar

I think the total keyword is missing

Sum({<Dimension_Field = {"=Rank(Sum(Value))<=6"}>}Value)/

Sum(TOTAL <Dimension_Field> {<Dimension_Field = {"=Rank(Sum(Value))<=6"}>} Value)

sweens78
Creator
Creator
Author

Hi Guys just on the above is it Sum(Value) does the expression go sum(expression) or is it just expression and I drop the sum?

In other words is it the 'value' the expression?

sunny_talwar

What was the expression you were working with?

rubenmarin

Hi Martin, Sum(Value) is the expression.

Expression / Expression_with_TOTAL_and_set_analysis

I think it should be only TOTAL, without the <>

Sum(TOTAL {<Dimension_Field = {"=Rank(Sum(Value))<=6"}>} Value)

sweens78
Creator
Creator
Author

Hi Guys

I should make this easier apologies,

So the dimension is Hospital Group and the

expression is a variable which is vAttendances variable calculation is Count(NEWKEYID)

Hope this makes it earier think Im getting mixed up where to put the values

sunny_talwar

Try this

Count({<[Hospital Group] = {"=Rank(Count(NEWKEYID))<=6"}>} NEWKEYID)/Count(TOTAL {<[Hospital Group] = {"=Rank(Count(NEWKEYID))<=6"}>} Value)

sweens78
Creator
Creator
Author

The 'Value' part at the end Im getting  an error Sunny, should it be NewKeyId?

sunny_talwar

My bad, yes you are right

Count({<[Hospital Group] = {"=Rank(Count(NEWKEYID))<=6"}>} NEWKEYID)/Count(TOTAL {<[Hospital Group] = {"=Rank(Count(NEWKEYID))<=6"}>} NEWKEYID)