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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
jood_ahmad
Creator II
Creator II

NESTED SUM WITH IF

dears,

if i have this data :

  

%Order_KeyPROMOFLAGITEM_DESCRIPTIONTOTAL_AMOUNT
43103PROMOBBQ Chicken Large64
43103PROMOBuffalo Chicken Large64
43103PROMODeluxe Large64
43103NOT PROMOMargarita Large30
43103NOT PROMOMirinda2
43110NOT PROMORanchy Original Medium20
43110NOT PROMORanchy Original No Jalapeno M.20
43111PROMOBBQ Chicken Small5
43111PROMOBBQ Chicken Wings9
43111NOT PROMOMirinda Citrus2
43112NOT PROMOGrilled Chicken Medium20
43112NOT PROMORanchy Sunset Large30
43113NOT PROMOQuesadilla BBQ18
43113PROMORanch Dip3
43113PROMOTomato Sauce Dip3

and i need to get the sum in text box for each %Order_Key to define what i sold for Promo and Not Promo in the same order.

example: this order(43103) has Promo & Not Promo i need to get the Total Amount for Promo & NOT Promo Individual like this: Promo:192  .  NOT PROMO: 32 .

but orders # (43110 , 43112) don't have Promo so it should not appear on my Total Not Promo because the only thing that i need to see is the total promo and in another text only the total of Not Promo in the orders has Promo(Extra Sales).

I get this result only when i select the order but when it was over all orders the formula not working and i gut confused .

Labels (1)
10 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Ahmad,

yes, you got it right. Using Advanced Search in Set Analysis, you can verify any "condition" for any field. Based on your explanation, you wanted to calculate totals per %Order_Key that satisfied certain conditions. For that purpose, I picked the same field for the Advanced Search condition.

cheers,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!