Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Top 5 Products by Market Share - Stacked Bar Chart

I have a stacked bar chart which i want to show the top 5 products by market share for each year.  I am failing to format the table so that it shows the top 5 products by market share for the various years in the data set.  An example application is attached. Please assist.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe with this expression

if(rank(Sum([MedAid Amount]+Shortfall)/Sum(TOTAL([MedAid Amount]+Shortfall))) <= 5,

Sum([MedAid Amount]+Shortfall)/Sum(TOTAL([MedAid Amount]+Shortfall))

)

1.png

View solution in original post

5 Replies
maxgro
MVP
MVP

maybe with this expression

if(rank(Sum([MedAid Amount]+Shortfall)/Sum(TOTAL([MedAid Amount]+Shortfall))) <= 5,

Sum([MedAid Amount]+Shortfall)/Sum(TOTAL([MedAid Amount]+Shortfall))

)

1.png

Anonymous
Not applicable
Author

Many thanks Maxgro, will use this and advise you accordingly

Regards.

Anonymous
Not applicable
Author

Hi Maxgro

Kindly post the sample application as i am having trouble in reproducing your recommendations.

Regards.

maxgro
MVP
MVP

PFA

Anonymous
Not applicable
Author

Thank you Maxgro most appreciate