Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Filter what to Sum

Hello.

I have a source table data like below:

NAME

TYPEJANFEBMARAPRMAYJUNJUL
name1type14824884672720588132
name1type2231237216114122130120
name1type306-15412618746
name2type11420-119418220874
name2type1141147126119116107102
name2type159860458390184597
name2type32392452245712962163
name2type306-1556957530
name3type2712-816423156145
name3type2865871850203420248
name3type2-84-79-996723176215

In the import file I definited that first two columns are description.

Now, I have created a table where in one column I listed Names, in other column I summarize months by Names.

How to construct expression to summarize all months only with Type1 and Type2?

1 Solution

Accepted Solutions

Re: Filter what to Sum

I would use a The Crosstable Load to transform the data and then do something like this

Sum({<TYPE = {'type1', 'type2'}>}Value)

5 Replies

Re: Filter what to Sum

I would use a The Crosstable Load to transform the data and then do something like this

Sum({<TYPE = {'type1', 'type2'}>}Value)

Not applicable

Re: Filter what to Sum

That work's thank you!

What if I had 10 NAMES and I wanted to exclude Name2 for example?
Is there a quick way to exclude or I have to create function to use 9 different names?

Chanty4u
Esteemed Contributor III

Re: Filter what to Sum

try below

add -   symbol before =

Sum({<TYPE -= {'Name2'}>}Value)

Chanty4u
Esteemed Contributor III

Re: Filter what to Sum

or

sum( {$<Type = E({1<Type={'Name2'}>})>} Value)

Re: Filter what to Sum

Yes, just as Chanty pointed out, it would be as easy as doing this:

Sum({<TYPE = {'type1', 'type2'}, NAME -= {'Name2'}>}Value)

or

Sum({<TYPE = {'type1', 'type2'}, NAME = -{'Name2'}>}Value)

The difference is that 1st expression will narrow down NAME when you select from any of the left over 9 names. Whereas the second option will always display the remaining names no matter what you have selected