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

Trouble with Set Analysis

I am trying to sum the total of parts cost * Qty on hand if the part has not had any movement in Sales_8_Months AND has not been received in the last 8 months. I have the set analysis statement I have been working with and it works on most of the part number but not this one. Any help would be much appreciated.

Sum({$<Sales_8_Months={"<=0"},PART_RECEIVED_MMonth={"<=$(=Date(AddMonths(Max(PART_RECEIVED_MMonth),-8),'MMM-YY'))"}>}[Part cost - PMPCST]*[Quantity on hand - PMQONH])

4 Replies
Not applicable
Author

Correction. It is now calculating but when I click on the part number in straight table the amount disappears.

amayuresh
Creator III
Creator III

please provide sample data.

Not applicable
Author

My set analysis is working if I do not select the part number. When I select the part number to show only that part number the set analysis No Movement 9 Months zeros out.

Here is where the No Movement 8 Months is showing correctly.

Capture.PNG

Here is when I select 5161419 part number it zeros out.

Capture1.PNG

Here is the set analysis expression I am using.

=Sum({$<Sales_8_Months={"0"},PART_RECEIVED_MMonth={"<=$(=Date(AddMonths(Max(PART_RECEIVED_MMonth),-9),'MMM-YY'))"}>}[Part cost - PMPCST]*[Quantity on hand - PMQONH])

Thank you

sunny_talwar

Not 100% certain, but can you try this:

=Sum({$<Sales_8_Months={"0"},PART_RECEIVED_MMonth={"<=$(=Date(AddMonths(Max({<[Part #]>}PART_RECEIVED_MMonth),-9),'MMM-YY'))"}>}[Part cost - PMPCST]*[Quantity on hand - PMQONH])