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

special aggregation functions

Hi

I require a special aggregation function, please help -

My data looks like:

Customer     SalesValue     CreditLimit

111               100               50

111               200               50

222               500               100

222               500               100

I have a Pivot table and I want to create and expression for total Credit Limit in Customer Level, which should look like

Customer     Sum of CreditLimit

     total          150

     111            50

     222           100

I tried to do:

Aggr(sum(CreditLimit), Customer)

When I show the Customer Dimension in the Pivot table - everything is fine.

But, when I collapse the Customer dimension - the expression column becomes empty...

BTW - I cannot change the data structure...

Please help ...

Thanks

Yaniv

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi

I took a wild guess and tried:

sum(Aggr(sum(CreditLimit), Customer))


it worked


Thanks

Yaniv

View solution in original post

6 Replies
MK_QSL
MVP
MVP

Only(CreditLimit)

or

Aggr(Only(CreditLimit),Customer)

or

SUM(DISTINCT CreditLimit)

or

Aggr(SUM(DISTINCT CreditLimit),Customer)

Anonymous
Not applicable
Author

Hi

I took a wild guess and tried:

sum(Aggr(sum(CreditLimit), Customer))


it worked


Thanks

Yaniv

MK_QSL
MVP
MVP

Have you tried any of my above suggestions?

I think all will work !

MK_QSL
MVP
MVP

Recheck.... your one is not working !!

Anonymous
Not applicable
Author

Just did... works ok...

arjunkrishnan
Partner - Creator II
Partner - Creator II

=aggr(NODISTINCT Sum(CreditLimit),Customer)