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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
redray82
Contributor
Contributor

How to Rolling sum on Qlik Sense

Hi … I am just beginner for qlik sense..

I would like to add some explression for 3month rolling count & sum in below expression..

there is date field (Fiscal year) which contain "2014-07-01" like this..

could you please add 3month rolling count & sum expression?

  • count({$<[Proudcts group]={'DE'},[Code group]={'PE'}>}[Code group])/Sum({$<[Shipping Proudcts group]={'DE'}>}[Q'ty])

 

Thank you.

5 Replies
robert99
Specialist III
Specialist III

redray82
Contributor
Contributor
Author

Thank you for your reply!

But i am an beginner for qlik sense and if you could make formula for this, it will be helpful to me..

(its very complicated with adding some expression for me )

robert99
Specialist III
Specialist III

Did you read the article I linked. including the beginning

Relative Calendar Fields

A common question in the QlikCommunity forum is how to show only the last N months. The suggested answers are most of the time relatively complex set analysis expressions including dollar expansions with aggregation functions, e.g.

  Sum( {$<Date={">=$(=MonthStart(AddMonths(Max(Date),-12)))<$(=MonthEnd(Max(Date)))"}>} Sales)

 Such an expression may work fine. However, it is not simple. When seen by someone who didn't write it, it is almost incomprehensible.

robert99
Specialist III
Specialist III

and if you have used data  manager the automatic script creates the required field "MonthsAgo" etc anyway

So if you open the Date field it should have all the sub fields linked to the date field that you need

Anil_Babu_Samineni

Try this?

count({$<[Fiscal year] = {">=$(=AddMonths(Max([Fiscal year])),-3)<$(=Max([Fiscal year]))"}, [Proudcts group]={'DE'},[Code group]={'PE'}>}[Code group])/Sum({$<[Fiscal year] = {">=$(=AddMonths(Max([Fiscal year])),-3)<$(=Max([Fiscal year]))"},[Shipping Proudcts group]={'DE'}>}[Q'ty])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful