Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
pavansonu99
Creator
Creator

reg: E() in set analysis

hi,

My data is like this

country          sales

india               1000

china              1400

usa                 1600

uk                   1300

germany          1900

i want sum of sales of countries but i want to exclude countries 'china' and 'UK'

how can we write set analysis in the expression          using E() and without using E()   

7 Replies
rupamjyotidas
Specialist
Specialist

Probably this will help

Sum( {<Country -={China,UK}>} Sales)

miguelbraga
Specialist III
Specialist III

Hey there,

Have you read this document?

https://community.qlik.com/docs/DOC-4951

Best regards,

D.A. MB

sunny_talwar

With E you can try this:

Sum({<Country = e({<Country = {'China', 'UK'}>})>} sales)

or

Sum({<Country *= e({<Country = {'China', 'UK'}>})>} sales)

miguelbraga
Specialist III
Specialist III

You can also try this out:

Expressions:

Without E():

Sum( {$<country -= {"china","uk"}>} sales)

With E():

Sum({$<country = e({<country = {"china", "uk"}>})>} sales)

Script:

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='£#,##0.00;-£#,##0.00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

LOAD * INLINE [

    country, sales  

    india, 1000

    china, 1400   

    usa, 1600   

    uk, 1300

    germany, 1900

];

Check my solution in the attached qvw file

Best regards,

D.A. MB

Not applicable

try this please

=sum({<Country=e(1<country={‘china’,’uk’}>})>}sales)

Not applicable

corrected code

try this please

=sum({<country=e({1<country={"china","UK"}>})>}sales)

Not applicable

without e()

=sum({<country={"*"}-{"uk","china"}>}sales)

try this please