Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhan_ram
Creator II
Creator II

Avg for Weeks Volume change region wise

Hi All,

I am trying to get the average change of volume(Slope) for weeks in a region. Below is the sample data.

  

REGIONWeekEndingDate            Volume
CENTRAL30/10/20157,542
CENTRAL06/11/20157,809
CENTRAL13/11/20157,527
CENTRAL20/11/20157,558
EAST30/10/20159,157
EAST06/11/20159,128
EAST13/11/20158,940
EAST20/11/20159,280
SOUTH30/10/20159,752
SOUTH06/11/20159,647
SOUTH13/11/20159,545
SOUTH20/11/20159,585
WEST30/10/20156,978
WEST06/11/20156,986
WEST13/11/20156,944
WEST20/11/20156,967

desired output should be  Region, Avg Volume Change for 4Weeks.

Thanks in Advance,

Padmanabhan  

14 Replies
settu_periasamy
Master III
Master III

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)

Capture.JPG

Edit

Try with Avg function

=Avg(Aggr(Sum(Volume)-Above(sum(Volume)),REGION,WeekEndingDate))

padmanabhan_ram
Creator II
Creator II
Author

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

padmanabhan_ram
Creator II
Creator II
Author

Hi Jonathan,

the expression doesn't give the expected output.

Thanks,

Padmanabhan

settu_periasamy
Master III
Master III

Hi Padmanabhan,

May be check your WeekEndingDate field is in Ascending Order.

Or Is it possible to create the Sample which is not working?

padmanabhan_ram
Creator II
Creator II
Author

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