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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AGGREGATE FUNCTION PROBLEM

I am in trouble with this expression:

=concat( round(AGGR(SUM(W_FT_VALORE_NETTO),C_PROVINCIA_FATT)), '|',fieldIndex('C_PROVINCIA_FATT', C_PROVINCIA_FATT))

This expression works and it gives me (for example) one result for each "C_PROVINCIA_FATT"

But if I add a condition as below:

=concat( IF( AGGR(  SUM(  W_FT_VALORE_NETTO),C_PROVINCIA_FATT)>9999,'100','0'), '|',fieldIndex('C_PROVINCIA_FATT', C_PROVINCIA_FATT))

It's going to give not the aggregation but a lot of results as the numbers of C_PROVINCA_FATT ....

Anybody can help me?

2 Replies
orital81
Partner - Creator III
Partner - Creator III

Hi

Your expression shows that you actualy want to see line count as the number of C_PROVINCA_FATT.

Since this is the right part of your Concatenation.

Anyway, If you want to see the distinct row count of C_PROVINCA_FATT

try adding Distinct as shown below:

concat( IF(AGGR(distinct SUM(W_FT_VALORE_NETTO),C_PROVINCIA_FATT)>9999,'100','0'), '|',fieldIndex('C_PROVINCIA_FATT', C_PROVINCIA_FATT))

vgutkovsky
Master II
Master II

Try this:

concat(distinct

aggr(

if(SUM(W_FT_VALORE_NETTO)>9999,100,0),

C_PROVINCIA_FATT

),'|',fieldIndex('C_PROVINCIA_FATT', C_PROVINCIA_FATT))

I'm not positive this is the exact syntax (a little hard to write this blind), but give it a shot.

Regards,

Vlad