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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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

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

View solution in original post

5 Replies
sunny_talwar

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

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

Not applicable
Author

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
MVP
MVP

try below

add -   symbol before =

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

Chanty4u
MVP
MVP

or

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

sunny_talwar

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