6 Replies Latest reply: Jul 15, 2010 6:09 AM by Ravi Achaliya

# 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.

• ###### Issue with set analysis formula

Maybe this will do it:

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

Hope that helps.

Mike.

• ###### Issue with set analysis formula

have u tried

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

• ###### Issue with set analysis formula

and did it work or what?

• ###### Issue with set analysis formula

Blaze,

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

• ###### Issue with set analysis formula

um...try this

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

maybe that will help...

• ###### Issue with set analysis formula

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