Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Would you be able to share some sample data with the expected output?
Please try RangeSum
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.
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%
Hi,
Try
count(NSN)/count(total <Year> NSN)
Regards,
Antonio
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
Thank you so much Antonio that did the trick.