Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to get the average change of volume(Slope) for weeks in a region. Below is the sample data.
REGION | WeekEndingDate | Volume |
CENTRAL | 30/10/2015 | 7,542 |
CENTRAL | 06/11/2015 | 7,809 |
CENTRAL | 13/11/2015 | 7,527 |
CENTRAL | 20/11/2015 | 7,558 |
EAST | 30/10/2015 | 9,157 |
EAST | 06/11/2015 | 9,128 |
EAST | 13/11/2015 | 8,940 |
EAST | 20/11/2015 | 9,280 |
SOUTH | 30/10/2015 | 9,752 |
SOUTH | 06/11/2015 | 9,647 |
SOUTH | 13/11/2015 | 9,545 |
SOUTH | 20/11/2015 | 9,585 |
WEST | 30/10/2015 | 6,978 |
WEST | 06/11/2015 | 6,986 |
WEST | 13/11/2015 | 6,944 |
WEST | 20/11/2015 | 6,967 |
desired output should be Region, Avg Volume Change for 4Weeks.
Thanks in Advance,
Padmanabhan
Hi,
May be try this.. (Not sure, how did you get (-182) for Central ), for me i'm getting (-282)
=Sum(Aggr(Sum(Volume)-Above(sum(Volume)),REGION,WeekEndingDate))/(Count(Distinct WeekEndingDate)-1)
Edit
Try with Avg function
=Avg(Aggr(Sum(Volume)-Above(sum(Volume)),REGION,WeekEndingDate))
Hi Periasamy.
Expression works fine in the sample data but when I implement the same in the real data, it doesn't give any value.
Thanks,
Padmanabhan
Hi Jonathan,
the expression doesn't give the expected output.
Thanks,
Padmanabhan
Hi Padmanabhan,
May be check your WeekEndingDate field is in Ascending Order.
Or Is it possible to create the Sample which is not working?
Hi Periasamy,
I was able to get for the volume growth change.
now I am trying to do the same for market share. I need to find the share change over 4 week.
Please let me know if you can help me.
Br,
Padmanabhan