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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get amount by several distinct columns values

Hello!

I need some help. I have made an example table below, in this table I would like to get amount per Distinct Date, Distinct Group and Distinct Category. I can´t get it to work. For example for Date 2014-08-25 and Group A and Category C I would like to get 10 from the Amount column. Hopefully someone knows how to do it.

DateGroupCategoryAmount
2014-08-25AC 10
2014-08-25AC10
2014-08-27BD20
2014-08-27BD20
2014-08-29CE30

Best Regards

Mårten

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,,

use below expression

=sum(aggr(sum(distinct Amount),Category,Group,Date))

Regards

ASHFAQ

View solution in original post

4 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,,

use below expression

=sum(aggr(sum(distinct Amount),Category,Group,Date))

Regards

ASHFAQ

Not applicable
Author

Hi,

Take these Date, Category , group as 3 dimensions for the straight/pivot table

and use the expression as

sum(distinct Amount).

MK_QSL
MVP
MVP

Create a Straight Table

Dimension

Date

Group

Category

Expression

Only(Amount)

Or

SUM(Distinct Amount)

Not applicable
Author

Thank you all, now I get it correct.

Regards

Mårten