Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum acquisition cost in set for null values in other field

Hi

I want to sum the acquisition cost for objects that are not scrapped (financial discarded) or have a higher scrappeddate then max selected YearMonth.

The last part I have solved by Sum({<ObjectID = p({<Scrapped_Year_Month  = {">(=Max(YearMonth))"}>} ObjectID)>} AcquisitionCost

My problem is to also include the acquisitions cost for all object that are not scrapped. They have null value in the Scrapped_Year_Month field.

Any suggestion how I can include a OR operation in above set to include the objects with nullvalue in scrapped-date?

1 Solution

Accepted Solutions
rubenmarin

Maybe you can use:

Sum({<ObjectID = p({<Scrapped_Year_Month  = {">(=Max(YearMonth))"}>} ObjectID)>} AcquisitionCost)

+ Sum({$-<Scrapped_Year_Month  = {"*"}>} AcquisitionCost)

Not tested

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,

Could the following work for you?

Sum({<ObjectID = p({<Scrapped_Year_Month - = {"*"}>} ObjectID)>} AcquisitionCost

rubenmarin

Maybe you can use:

Sum({<ObjectID = p({<Scrapped_Year_Month  = {">(=Max(YearMonth))"}>} ObjectID)>} AcquisitionCost)

+ Sum({$-<Scrapped_Year_Month  = {"*"}>} AcquisitionCost)

Not tested

Not applicable
Author

nice and easy, did´t thought about to use two separate calculations