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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
rabbani_sk
Contributor III
Contributor III

How to calculate Average Qty per day

Hi all,

I need to Caluculate the Average Quantity of an item , depending up the days filtered in calendar object...

Urgent Requirement ! Any idea?

5 Replies
Not applicable

try the below expression

sum(Quantity)/aggr(Sum(Quantity) item)

Regards,

Kabilan K.

Not applicable

Can you please post some sample application.

rabbani_sk
Contributor III
Contributor III
Author

I am using below expression, and the stated the script for Calendar object,

=fabs(Sum({<[Item Ledger Entry Type]={1,3,5},[Posting Date]={'>=$(=Date(vStartDate))<=$(=Date(vEndDate))'}>}Quantity))

so for this i want to caluculate the average qty dynamically with the change in dates in the Calendar Object

Note: i didnt not used any  Date field in dimension, i used only item no, item category

VishalWaghole
Specialist II
Specialist II

Hi,

Please Try this

avg(aggr(sum(Quantity), Item))

Hope that will solve your problem.

Thanks

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

http://community.qlik.com/blogs/qlikviewdesignblog/2013/07/29/averages

sum(Quantity)/Count(Distinct DateFieldName)

Hope this helps you.

Regards,

jagan.