Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kroberts13
Contributor III
Contributor III

Average Charges Per Day

I am trying to calculate average charges per day of the month. So for example I need to look back 12 months to get the average charges on each day. On the 1st, I need to calculate the average charges for the previous 11 months on the 1st. I need to do that every day. I need that to be rolling for the month. Meaning, If the average on the 1st of the month is $3,000 and the average of day 2 is $4,000. I need day 2 to show $7,000.

This is how charges are calculated....   Sum({$<[DETAIL_TYPE] = {1,10}>}AMOUNT)

4 Replies
sunny_talwar

Would you be able to share few rows of data with the output you expect from it? or a sample?

kroberts13
Contributor III
Contributor III
Author

PostDateHistoricalChgs
1/1/2017$7,847,408.83
1/2/2017$5,232,729.55
1/3/2017$7,877,031.72
1/4/2017$10,548,212.53
1/5/2017$13,286,156.79
1/6/2017$16,188,595.88
1/7/2017$19,458,974.48
1/8/2017$23,025,127.71
1/9/2017$25,805,087.64
sunny_talwar

What is the expected output?

kroberts13
Contributor III
Contributor III
Author

That is what I currently have in Excel, but it would be a lot of manual work to update the Excel file for Qlik every day. That is what I am trying to get in Qlik. IF it is possible to get charges (Sum({$<[DETAIL_TYPE] = {1,10}>}AMOUNT) averaged out for the specific day of each month looking at the last 12 months that would be great.