Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Sum Distinct Values within Expression on a Chart

Hi
I am creating a Chart, Lines with Bars. The lines are a sum of a column this is easy to do. But the bars need to be the sum of distinct values of certain column.
For example:
         

Header 1Header 2Header 3

4/1/2014

A.15
4/1/2014A.15
4/1/2014A.225
5/1/2014A.330
5/1/2014A.330
5/1/2014A.330
5/1/2014A.330

What I am trying to do is for each month in the chart the Bar will be the distinct sum of Header3. So lets say the user choose A.1 and A.2  from a list box for just April 2014, the distinct values of Header 3 are 5 + 25 = 30 and would be the value of the bar, I do not want 5 +5 + 25.

Any Ideas?

Thank You

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can use "distinct" in sum:

sum(distinct Header3)

View solution in original post

2 Replies
Anonymous
Not applicable
Author

You can use "distinct" in sum:

sum(distinct Header3)

Not applicable
Author

Thank You it worked, awesome.