Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total over different fields

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?



0 Replies