Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All ,
it is possible to do Sum Inside Count Aggr function
COUNT(AGGR(Sum({< ITEM_GROUP={[XXXXX]} >},QUANTITY)), %Order_Key)
what is wrong in my formula .
Message was edited by: Ahmad Kastero
Remove the comma before QUANTITY and move a bracket to the end:
=COUNT(AGGR(Sum({< ITEM_GROUP={[XXXXX]} >} QUANTITY), %Order_Key))
But I am not sure what you want to achieve with this expression, counting a sum?
edit:
Another question: what do you want to achieve with this set modifier:
ITEM_GROUP={[XXXXX]}
if you want to do a record based field value comparison,you are probably better off with
=COUNT(AGGR( Sum(If( ITEM_GROUP=[XXXXX], QUANTITY)), %Order_Key))
did u try outside it
AGGR(count(Sum({< ITEM_GROUP={[XXXXX]} >},QUANTITY)), %Order_Key)
i have to build a report with this :
first of all i have an Orders and this Orders are contain Items like X,Y, Z ; i need to know how many orders that have Quantity from (X) if Sum of X are =1 and how many orders that have quantity from (X) if the Sum of X are = 2
and the quantity are inserted to my DB by number 1;
so i need first to get the sum for each item group after that count the orders that meet my condition.
i hope this will clarify and clear .
Still not clear what you are trying to achieve, can you try this
=count({<%Order_Key={"=sum({<ITEM_GROUP={[XXXXX]}>}QUANTITY)>0"} >}%Order_Key)
if not help then please post some sample data with required output
unfortunately this is not working i will upload a sample.
unfortunately this is not working i will upload a sample.
This? according to your sample
what formula you use for this.?
I am getting a slightly different output then urs Kush.
I got 55105, 41114 and 75684 using these expressions
1)=Sum(Aggr(If(Count({<ITEM_FAMILY_GROUP = {'Large Pizza'}>} %Order_Key) = 1, 1, 0), %Order_Key))
2)=Sum(Aggr(If(Count({<ITEM_FAMILY_GROUP = {'Large Pizza'}>} %Order_Key) = 2, 1, 0), %Order_Key))
3)=Sum(Aggr(If(Count({<ITEM_FAMILY_GROUP = {'Large Pizza'}>} %Order_Key) >= 2, 1, 0), %Order_Key))