Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with set analysis formula

I have a table that contains a column of unit costs and unit quantities. I need to create a variable in a chart which adds the total invoice quantities where the unit cost is > 4. I am using the following formula however the UnitCosts={"<>4"} portion of the formula is being ignored. I keep receiving the sum of all quantities.

sum({<FromCurrency={'$(vCURR)'}, UnitCosts={"<>4"}>} QtyInvoice)

I am a qlikview novice. Any help is greatly appreciated.

6 Replies
mike_garcia
Luminary Alumni
Luminary Alumni

Maybe this will do it:

=Sum({<FromCurrency={'$(vCURR)'}, QtyInvoice = {"=Sum(UnitCosts)>4"}>} QtyInvoice)


Hope that helps.

Mike.

Miguel García
Qlik Expert, Author and Trainer
Not applicable
Author

have u tried

sum({<FromCurrency={'$(vCURR)'}, UnitCosts={>"4"}>} QtyInvoice)

Not applicable
Author

and did it work or what?

Not applicable
Author

Blaze,

Unfortunately not. When I move the position of the quotes a null value is returned.

Not applicable
Author

um...try this

sum(({<FromCurrency={'$(vCURR)'}, UnitCosts={<'4'}>}-1) QtyInvoice)

maybe that will help...

Not applicable
Author

Hi Paul,

Plz refer to attachment.

Use SET Analysis instead of variable.

Formula will be



Sum

({<Cost = {">4"}>}Qty )



Let me know if there is difficulty.

Sincere Regards,

Happy Thoughts