Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

regarding or condition

hi team, i have a doubt .

customer name                              sales              sales

abc                                                  2000         25000

xyz                                                  3000          4000

lmn                                                  2500           5000

i want sum  of sales when   customer abc or ayz

5 Replies
Gysbert_Wassenaar

sum({<[customer name] = {'abc','ayz'}>}sales)

If you mean xyz instead of ayz, then replace ayz with xyz in the expression above.


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

Use below in script

===============

CrossTable(Year, Sales)

Load * Inline

[

    customer name, YEAR1 sales, YEAR2 sales

  abc, 2000, 25000

  xyz, 3000, 4000

  lmn, 5000, 6000

];

=====================

Use below in text box (Same as suggested by Stefan)

=SUM({<[customer name] = {'abc','xyz'}>}Sales)

its_anandrjs

Simply write

Sum({< [customer name] = {'abc','xyz'} >} sales)



but your question is for customer abc or ayz


replace ayz to xyz in the table.

Not applicable
Author

HI IF I USE AND CONDITION INCASE OF OR CONDITION ITS SHOWING NO VALUE

its_anandrjs

Then write like below script because you want only abc, xyz then ignore lmn



Sum({< [customer name] -= {'lmn'} >} sales)