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

Bar chart grouping help

Hi all

I have a bar chart with two dimensions (Year and Progression) and one measure. my measure is a percentage which is at the moment using total count(NSN)/count(total NSN) but this of course is creating the percentage across all years, I am looking for a way to make it the percentage across progression for each year.

Any help would be greatly appreciated.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi,

Try

count(NSN)/count(total <Year> NSN)

Regards,

Antonio

View solution in original post

7 Replies
sunny_talwar

Would you be able to share some sample data with the expected output?

Anonymous
Not applicable
Author

Please try RangeSum

Anonymous
Not applicable
Author

Hi Haikuo

How does Rangesum work and where in the calculation would I use it. I have tried it at the start of the expression and at the start of the second part and am not getting a different result.

Anonymous
Not applicable
Author

Hi Sunny

I can't share the data but what I have 10 bars 5 for 2012, 5 for 2013, each has a percentage but it is a percentage of all 10. what I am expecting is the 2012 bars are percentages of just those 5 not all 10 and the same for 2013.

Each grouping of 5 should add to 100%

Capture2.PNG

antoniotiman
Master III
Master III

Hi,

Try

count(NSN)/count(total <Year> NSN)

Regards,

Antonio

sunny_talwar

As antoniotiman‌ pointed out, you need to specify the field name you are totaling on. When you calculate the total for denominator, you don't want the overall total, but total by year. So you need to specify in your expression like this:

Count(NSN)/Count(TOTAL <YearFieldName> NSN)

Here replace YearFieldName with whatever you call that field in your database and then you will see that percentage will add up to 100% for each year

Anonymous
Not applicable
Author

Thank you so much Antonio that did the trick.