Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get monthly average sales per product?

Hi everyone,

I'm creating a chart which displays the monthly average sales per product however I have a daily data set in Excel.

1.PNG

In the Expressions tab, I used this expression: =Avg(Aggr(Sum(Sales),Date,Product)) and upon applying, chart looked like this

2.PNG

The scale was a lot smaller since I have data set in daily format but what I need is the monthly averages.

I've also tried editing the Script using the MonthStart string to no avail. Hope someone can help me on this.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Have you tried this?

=Avg(Aggr(Sum(Sales),MonthYear,Product))

Where MonthYear is calculated in the script like this

Date(MonthStart(Date), 'MMM-YYYY') as MonthYear

View solution in original post

2 Replies
sunny_talwar

Have you tried this?

=Avg(Aggr(Sum(Sales),MonthYear,Product))

Where MonthYear is calculated in the script like this

Date(MonthStart(Date), 'MMM-YYYY') as MonthYear

Anonymous
Not applicable
Author

I did it! Thanks for the help!