Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, maybe you can help me out with this question.
Here is my table from SQL:
and what I need is to display only the rows where ACUM sum includes STOCK amount:
Many TKS in advance.
@oscarvictory try below. Highlighted in Green you can replace it with measure you want to show. Suppose you want to show ACCUM , so replace it with below
sum(aggr(rangesum(above(total Sum(Qty),0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))))
=if(aggr(rangesum(above(total Sum(Qty),0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))) <= min(total <PRODUCT>aggr(if(rangesum(above(total Sum(Qty),0,RowNo())) > = sum(STOCK),rangesum(above(total Sum(Qty),0,RowNo()))), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING)))),
Sum(Stock),0)
Well, finally I add an equal to the comparison symbol and it worked as expected!!
Thank you very much!!
=if(aggr(rangesum(above(total Sum(Qty),0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))) <= min(total <PRODUCT>aggr(if(rangesum(above(total Sum(Qty),0,RowNo())) > = sum(STOCK),rangesum(above(total Sum(Qty),0,RowNo()))), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING)))),
Sum(Stock),0)