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: 
Not applicable

Bucket Calculation

Hi All

I have a date field  which represents  Item used on  , now I want to calculate Buckets for every Item with an interval of 6 months from its first usage when user selects on 6 Months I would like to calculate sum of  lent for each item, from its first usage date. can any one help me on this how to get it done.

Regards

John

4 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Check this out John:

https://community.qlik.com/docs/DOC-4252

It may help you.

Regards,

MB

Anonymous
Not applicable
Author

Hi,

You can use the function addmonths to calculate the 6 last months:

Add a button with an action like this:

If your date field is named "Date" : the action will be select in a field:

='>='&AddMonths(Max(Date),-6)&'<='&Date(Max(Date))

Then your doc will be filtered in the last 6 months of your date.

You can also use rhis expression in a set analyses, example:

sum({<Date={" >=$(=AddMonths(Max(Date),-6)) <=$(=Date(Max(Date))) "}>}Sales)

Not applicable
Author

Thanks Sbobbyraj, unfortunately I need to calculate it on the data model script.