Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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