Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum the values matching a criteria

Hi guys,

I have a simple question that's making me crazy, but I'm a newbie in qlik and I'm doing some practice right now.

I have a data with these information:

ID          | Duration

1            | 10

2            | 4

3            | 5

1            | 6

5            | 9

2            | 12

I have to create an expression for a graph in order to get the sum of the duration for each IDs. The result I'm expecting is:

1 -> Sum: 16

2 -> Sum: 16

3 -> Sum: 5

... and so on for all the records in my data source.

How can I accomplish that? I have a strong background in excel and I was trying to look for a function like SUMIFS, but reading some of the posts in the community I noticed that the subject is different than I though.

Thanks to all

Maurizio

5 Replies
Not applicable

Plz. see the attached and let me know if you any queries

ramoncova06
Specialist III
Specialist III

Hi Maurizio this can be done with set analysis A Primer on Set Analysis

Gabriel
Partner
Partner

Hi,


I think if you make the Dimension to be ID and your expression should just be

=Sum(Duration).

This should give you the of each ID.

Hope this helps

Not applicable

Hi guys,

I've solved my doubt using this expression: =Sum( if( Type = '1' , Duration))

By the way, thanks to everybody for the replies

Not applicable

you can also use sum({<Type ={'1'}>}Duration).

If you have got the help or answer. Then please close the thread by marking any question as answered or helpful

Thanks,

Singh