Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need some help to set a formula.
I have a variable, vStock, that calculate the items stock at a given date:
SUM({$<StockDate={">=$(=MIN(DateInit))"}>*$<StockDate={"<=$(=MIN(DateEnd))"}>} Quantity )
I'm trying to count the distinct items where stock is greather than zero, for example:
COUNT DINTINCT [Item] WHERE [vStock]>0
After some research I find out this formula, but is very slow (and I don't know if it is correct):
COUNT(DISTINCT AGGR(if($(vStock)>0, Item), Item))
There is another, simple way to calculate this without Aggr and/or If statement?
Gabriele,
What about this:
Count({<ITEM={"=$(vStock)>0"}>} Distinct ITEM)
Cheers