Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Attached is the sketch of the required bar chart. Along with the sample Excel file.
Looking for help in building this chart
no what I meant is lets say If I have another field called State and I want to use the same metrics for the filed of 'GA' for example
Something like
=Sum({<State={'GA'}>} Amount)
/
Sum({< State ={'GA'}> } TOTAL <Year> Amount)
its not working??
I guess create a new field from Sales Date. -> Year([Sales Date]) as [Sales Year]
And then use Year as your 1st dimension and Sales Year as second dimension
Expression:
Sum(Amount)/Sum(TOTAL <Year> Amount)
But if you look at the sketch I need to group the previous 2 years as one block and anything older then 3 yrs as a seperate block
May be create a flag in the script:
If(Year = Year([Sales Date]) or Year = Year([Sales Date]) + 1, Year([Sales Date]), Dual('<=' & (Year -2), (Year - 2))) as [Sales Year]
And then then same two dimensions and try the same expression
Can you please post a sample qvw
Like this:
Yes exactly. can you pls post the QVW?
I did add it to my response above. Open the link here ->Re: Stacked Bar Chart Issue
Got it, one last question. I am still not able to do the 3 stacks, so if Year is 2016 I would like to see
Stack 1 Sale Year = Year
Stack 2 Sale Year = Year-1 and Year -2
Stack 3 Sale Year <= Year -3
All 3 stacks should add up to 100%
Above image is showing three stacks and they are adding up to 100%. Did you follow the similar logic in the script?