Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
MaSo1996
Contributor II
Contributor II

How to calculate average per product per month per year

Hello,

I would like to create a table with 3 products, that were sold in our company in previous years - I would like to see, what was te averege price for product in i.e May 2024, April 2023 etc - currently I tried to use given load statement in script:

NewTable:
Load
Year,
Month,
Indeks,
Avg(Preis)
Resident TempTable
Group By Year, Month, Indeks;

Unfortunately it didn't give me desired result - I received average price of product over the entire period of time, I loaded into the table.

Could you tell me, what would give me the result I want?

Labels (2)
1 Reply
marcus_sommer
MVP
MVP

The script should exactly be doing what you have described. To check that there are a record for each Year + Month + Indeks combination you could pull these fields + avg() into a table-box (you should alias the aggregation appropriately).