Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to show top 10 values in graph without changing their relative percentage values?

Hi Folks,

I'm relatively new to QlikView and I am facing a very silly issue I believe. For the graphs I've made in QlikView I just want to show top 10 Part Numbers based on the expression "count(CustomerOrderNo)". When I allow charts to show all the values, the % values on the bars are correct which is [count(customerorderNo filtered by part no)/total count(customerorderNo)] but when I restrict the chart to just show 10 top, the values on the chart gets changes as it automatically take count(customerorderNo) for just top 10 part number as total and shows the % accordingly.

Is there any way I can keep the old values and just show top 10 part numbers in chart. Capture.PNGCapture1.PNGCapture2.PNGCapture5.PNG

9 Replies
sunny_talwar

Would you be able to share the qvw to see what you have and help you better here?

Anonymous
Not applicable
Author

Let me know if you need anything else stalwar1

Capture.PNG

campbellr
Creator
Creator

Hi Niket

I think you need to put {1} in the count you use as the denominator, this will then be calculating the percentages against a total that has not been effected by any filtering.

count({1} customerorderNo)

the {1} tells Qlik to ignore filters on the data set

Anonymous
Not applicable
Author

Hey Ron,

Thanks for the reply. I just checked the graph with the formula you mentioned, it's not working. It still calculates the percentage based on the filtered numbers instead of total count.

Let me know if  I am doing anything wrong here.Cap1ture.PNGCapture.PNG

campbellr
Creator
Creator

Hi Niket

I'm thinking you'll need to calculate the % manually rather than using the relative option as the relative option is what is generating the % based on the data being displayed.

So instead of graphing count (System_CustomerReferenceOrderID) and showing relative go for a graph of:

count (System_CustomerReferenceOrderID) / count ({1} System_CustomerReferenceOrderID)

Thus, count (System_CustomerReferenceOrderID) gives you the count for the selection and

count ({1} System_CustomerReferenceOrderID) give you the count for the entire dataset.

There may be some messing about to do to enable you to show both the count and the %. Maybe multiple axis.

First expression being the count and the second expression being the %

Hope this makes sense.

pablolabbe
Luminary Alumni
Luminary Alumni

Maybe this could help

  The expression below calculates the relative percentage over a total count disregarding the dimensions itens and also with a set modifier to ignore filters over dimension field "ApplierNumber"

count ( System_CustomerReferenceOrderID)/ count ( TOTAL {<ApplierNumber=>} System_CustomerReferenceOrderID)


Don´t forget to uncheck the Relative property

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others

Anonymous
Not applicable
Author

Hey Pablo and Ron,

Thanks for the answers. pablolabbe‌ I am a little confused about <ApplierNumber=>, do I have to create a calculated dimension for that? Or you were trying to say ApplierNumber = total number of items present in my data.

Anonymous
Not applicable
Author

Hey pablolabbe‌,

Sorry for the previous message. I think I got it resolved. Thank you so much guys, I appreciate your help,

pablolabbe
Luminary Alumni
Luminary Alumni

Can you share the final expression ?