Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
asmithids
Partner - Creator II
Partner - Creator II

Set Analysis with Multiple Modifiers

Hi,

I'm trying to pull the quantity on hand (QOH) from a table that contains QOH per year per period.  The set analysis below has multiple modifiers to filter the QOH for the year and period.  I'm not getting errors, but the result is 0 (zero).  I'm not sure where my set expression is failing.  Any assistance would be very much appreciated.

Thank you in advance.

=Num((Sum({$<FiscYear={$(=Max(FiscYear))}, FiscPer={$(=Max(FiscPer))}> } QtyOnHand)))

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

9 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Alec,

It's hard to say without app.

Please share your app or data sample

Regards,

Sergey

Regards,
Sergey
asmithids
Partner - Creator II
Partner - Creator II
Author

Hi Sergey,

See attached app.  I added a Bookmark called Item: 8202030.  This particular item has QOH. 

Thank you,

Alec

anbu1984
Master III
Master III

=Num((Sum({$<FiscYear={$(=Max(FiscYear))},  FiscPer={$(=Date(Max(FiscPer),'MMM'))}> } QtyOnHand)))

asmithids
Partner - Creator II
Partner - Creator II
Author

Anbu,

Thank you for the fix.  I am now getting numbers.  However, the quantity is not agreeing to the source system.  Also, when I filter on any FiscPer, the quantity does not change.  It is remaining at 1,352. 

anbu1984
Master III
Master III

=Num((Sum({$<FiscYear={$(=Max(FiscYear))},  FiscPer={$(=Month(Date#(Max({<FiscYear = {$(=Max(FiscYear))}>} FiscPer),'MM')))}> } QtyOnHand)))

anbu1984
Master III
Master III

Check this

SergeyMak
Partner Ambassador
Partner Ambassador

Alec,

I just can't understand why do you use set analysis here..

Try to use the following expression

=Num(Sum(QtyOnHand))

PFA

Regards,
Sergey
asmithids
Partner - Creator II
Partner - Creator II
Author

Works!!!  Thank you Anbu!!! 

asmithids
Partner - Creator II
Partner - Creator II
Author

Sergey,

You are correct in what you are saying.  The full purpose of the expression will be to calculate inventory turnover.  I need to first compute the average inventory for the period -  (beginning inventory + ending inventory)/2

Now that I have the current period working, I need to calculate the beginning inventory which is the ending inventory from the previous period using -1 in the modifier.