Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to display pie chart for the last five years (trellis chart) did the trick for it. However, when I am trying to calculate percentages, I am able to see data for the current year(2017). I need the percentages for all the remaining years (2013-2017). I am restricting the years in my expression. Gender is the dimension being used. Do I need to add Year as a secondary dimension in the Trellis chart?
Any help would be greatly appreciated!
Below is the expression I am using to achieve this:
num(sum(vGender)/sum(total <Year> vGender), '##.#%')
The variable vGender contains the calculation to restrict the years and the count. I am getting the correct counts, percentages in the issue.
What is the exact issue with the percentages? 36.5 and 63.5 are not the right percentages?
They are the correct percentages, I need to display it for 2013-2017 (shown below) but it is displaying only for 2017.
What is the content of variable vGender?
Hi,
I am already using Year as the first dimension but still it doesn't work. Is it because I am using Year in an expression to restrict the number of years?
sum({$<PeriodYear= {">=$(=vPriorFiveYear)<=$(=vPeriodYear)"} >}[# HeadCount])/ 12- Gives me the year range from 2013-2017 and the count of female/male
Is it because I am using Year in an expression to restrict the number of years?
No, with your expression you should get Year 2013 to Year 2017 in your treillis pie chart.
Any solution or ideas on how to display the percentages for all the years?
After trying several options, I am getting it like the one below. Except for 2017, rest of the years display 0% values.