Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

Set analysis 3 last months ItemQuantitySales

Hi All dear experts,
I'm trying to analysis the quantity sold  of many items of the last 3 months form the current month with the next set analysis function but it's not getting any field:
=Sum ( { $ < Month = {$(=Max(Month)-1)} > } [ItemQuantity])
I would appreciate a lot if someone could help with this trouble, also i attached an example that show how supposed to look like.

ItemCodeItemDescriptionJanuary ItemQuantityFrebruary ItemQuantityMarch ItemQuantity
1Keyboard1067062
2Mouse282439
3Headset9610284
4MotherBoard4107
5HDD229130143


King Regards.

JAMM.

1 Solution

Accepted Solutions

Re: Set analysis 3 last months ItemQuantitySales

How about this?

=Sum({$< Month = {$(=Month(Date#(Max(Month)-1, 'M')))}>} [ItemQuantity])

 

4 Replies

Re: Set analysis 3 last months ItemQuantitySales

How does your Month field look like... is it formatted as Jan, Feb, Mar... or does it look like 1, 2, 3?

Partner
Partner

Re: Set analysis 3 last months ItemQuantitySales

Hello Sunny,
As Jan, Feb, Mar.

Regards.

Re: Set analysis 3 last months ItemQuantitySales

How about this?

=Sum({$< Month = {$(=Month(Date#(Max(Month)-1, 'M')))}>} [ItemQuantity])

 

Partner
Partner

Re: Set analysis 3 last months ItemQuantitySales

it works, much appreciated thanks for your help and time.

Regards.