cancel
Showing results for
Did you mean:
Creator II

## Only count SKU's where qty on orderlines is greater than zero

Hello,

i want to count all distinct SKU's based on this:

Count(DISTINCT     {<date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}   sku_code          )

that works but it also gives me SKU's that don't have orderlines associated with them.

How should i need to adapt the count formula so that it only counts those SKU's where below qty is greater than zero?

sum (     {<date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}      (qty_unit-qty_unit_cancelled))

Thanx a lot!

chris

1 Solution

Accepted Solutions
MVP

You need to put the same condition in set , like:

Count(DISTINCT     {<sku_code={`=sum (     {<date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}      (qty_unit-qty_unit_cancelled))>0` },

date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}   sku_code  )

Note, the back quotes in red. You could use another valid quote though.

2 Replies
MVP

You need to put the same condition in set , like:

Count(DISTINCT     {<sku_code={`=sum (     {<date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}      (qty_unit-qty_unit_cancelled))>0` },

date={">=\$(=VDatumSeizoenHuidigVan)<=\$(=VDatumSeizoenHuidigTot)"}>}   sku_code  )

Note, the back quotes in red. You could use another valid quote though.

Creator II
Author

ok, that worked perfectly!

Thanx a lot!!

Chris

Community Browser