# Qlik Sense App Development

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for
Did you mean:
Highlighted
Creator

## Count Moving Average Unit Cost (MAUC) in script on the certain date

Hello,

I have a table:

 DATE ITEM MOVE AMOUNT ACTUAL STOCK (quantity) PRICE ACTUAL STOCK (money) MAUC 1.3.2020 M01 Income 5 5 1 5 € 1 € 7.3.2020 M01 Income 5 10 2 15 € 1,5 € 9.3.2020 M01 Expenditure 2 8 1,5 12 € 1,5 € 17.4.2020 M02 Income 3 3 5 15 € 3 € 19.4.2020 M02 Income 6 9 4 33 € 3,6667 € 7.5.2020 M01 Expenditure 3 5 1,5 7,5 € 1,5 € 7.5.2020 M02 Income 1 10 5 38 € 3,8 €

INCOME - is calculated in MAUC

Expenditure - is always in actual value of MAUC

How can I calculate value of MAUC in different time period ?

For example MAUC for M02 in 17.4.2020 is 3 € and in 7.5.2020 is 3,8 €.

Thank you

Labels (2)

• ### Script

6 Replies
Master

what is the formula you use for MAUC calculating ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Highlighted
MVP

MUAC is based off of PRICE column? If it is, then on 17.4.2020, are you doing 1 (1.3.2020) + 2 (7.3.2020) + 5 (17.4.2020) divided by 3? If that is true, then 8/3 should be 2.66667? If that is not what you are doing, then what is the calculation which gives you 2 here?

Highlighted
Creator
Highlighted
Creator

Hello,

here is a link, how is MAUC calculated - https://docs.infor.com/ln/10.3/en-us/lnolh/help/wh/onlinemanual/000347.html

Highlighted
Creator

17.4.2020 is another item M02.

Highlighted
Creator

Sunny, could you give me some solution ?

Thank you