Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
DEAR TEAM I HAVE ONE DOUBT PLEASE FIND BELOW
YEAR1 YEAR2
customer name sales sales
ABC 2000 25000
XYZ 3000 4000
LMN 5000 6000
FROM THIS I WANT SUM OF SALES WHEN CUSTOMER IS ABC OR XYZ
sum({<[customer name] = {'ABC', 'XYZ'}>} SALES)
Sum(If([Customer name] = 'ABC' Or [Customer name] = 'XYZ',Sales))
thanks its working
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)
Can you mark posts Anwered/Helpful?
Please make sure you reply to both of your threads, this one and http://community.qlik.com/thread/116940 to make sure that everything ties up neatly.
Also, in future could you please try to not re-ask the same question in different threads?
Regards,
James.
HI HOW TO USE AND CONDITION OF THIS INCASE OF OR
Replace Or by And
Sum(If(Field1 = 'ABC' And Field2 = 'XYZ',Sales))
Do you mean you want to use And in this condition "[Customer name] = 'ABC' Or [Customer name] = 'XYZ'"?