Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
crichter14
Creator
Creator

AGGR and Set Analysis

Help my AGGR isn't working, I'm trying to group this expression by Season Title, (not the same as year).  Below is the code.  If the user selects Sales $ there is on Set Analysis and if they select Sales Units there is a different Set Analysis.

I can't seem to figure out where the AGGR belongs to group every season together.

Suggestions welcome!

 

AGGR(If([UNITS MONEY SELECTION] = 'SALES $',

Sum({$<

[PRODUCT]={'DRESS'},

TRANSACTION_ORDER_INVOICE={'SALES ORDER'},

STOCK_ONLY={'NO'},

[CUSTOMER ORDER DATE] ={">=$(vMinCurrentDateSelectionAdj)<=$(vMaxCurrentDateSelectionAdj)"}>}

(SO_LN_GROSS_AMOUNT_$(var_Currency)-SO_LN_DISCOUNT_AMOUNT_$(var_Currency)))

/

Sum({$<

[PRODUCT]={'DRESS'},

TRANSACTION_ORDER_INVOICE={'SALES ORDER'},

STOCK_ONLY={'NO'}

[SCUSTOMER ORDER DATE] ={">=$(vMinCurrentDateSelectionAdj)<=$(vMaxCurrentDateSelectionAdj)"}>}

TOTAL (SO_LN_GROSS_AMOUNT_$(var_Currency)-SO_LN_DISCOUNT_AMOUNT_$(var_Currency)))

,

If([UNITS MONEY SELECTION] = 'SALES UNITS',

Sum({$<

[PRODUCT]={'DRESS'},

TRANSACTION_ORDER_INVOICE={'SALES ORDER'},

STOCK_ONLY={'NO'}

[CUSTOMER ORDER DATE] ={">=$(vMinCurrentDateSelectionAdj)<=$(vMaxCurrentDateSelectionAdj)"}>}

[ORIGINAL QTY ADJ]))

/

Sum({$<

[PRODUCT]={'DRESS'},

TRANSACTION_ORDER_INVOICE={'SALES ORDER'},

STOCK_ONLY={'NO'}

[CUSTOMER ORDER DATE] ={">=$(vMinCurrentDateSelectionAdj)<=$(vMaxCurrentDateSelectionAdj)"}>}

TOTAL [ORIGINAL QTY ADJ])), RIGHT(SEASON_TITLE,2))

Labels (4)
1 Solution

Accepted Solutions
JustinDallas
Specialist III
Specialist III

Do you have any dummy data for us to play with?  And it looks like you are missing a comma after your 'STOCK_ONLY={'NO'}' statement.  Not sure if it was lost in the transfer to the forum question.

View solution in original post

1 Reply
JustinDallas
Specialist III
Specialist III

Do you have any dummy data for us to play with?  And it looks like you are missing a comma after your 'STOCK_ONLY={'NO'}' statement.  Not sure if it was lost in the transfer to the forum question.