Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I want to write the following expression:
sum(aggr(if( INV_HIST_STORE_ON_HAND > 100,
sum(total<HIERARCHY, WEEK> TRX_NET_UNITS)
/
sum(total<HIERARCHY> TRX_NET_UNITS)
),ITEM_SKU, WEEK))
where HIERARCHY is a field that for each ITEM_SKU contains the name of one of 4 fields :
SUB_CLASS_NAME
CLASS_NAME
SUB_DEPARTMENT_NAME
DEPARTMENT_NAME
So that the expression would total over the field contained in HIERARCHY for each ITEM_SKU.
Is this possible, or is there an alternative that does not use nested if statements or pick?