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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gestion-PSD
Creator II
Creator II

split an aggr function by non aggregate dimension

Hi all!

I've a problemn with an aggr function. I hope I could explain myself.

What we want is to "split" the results of an aggr function by one dimension that was not used in aggregation. 

I mean, using the data and aggr function used as example in Qlik Help:

Sum(Aggr( Rangesum(Above(Sum(Sales),0,12)), (Year, (Numeric, Ascending)), (Month, (Numeric, Ascending)) ))

if I try to show a table with Year, Month and OrderID as dimensions, all rows but one per year/month shows zeros.

This is the table with Year and Month dimensions:

GestionPSD_0-1631099057931.png

But, when I add OrderID as dimension:

GestionPSD_1-1631099128984.png

What we want is to populate all these rows. I mean, What I want is something like if I were using a bunch of aggr functions, one for each OrderID aggregating by Year & Month

 

Best regards,

Alonso Torres

2 Replies
brunobertels
Master
Master

Hi 

may be this 

Sum( TOTAL Aggr( Rangesum(Above(Sum(Sales),0,12)), (Year, (Numeric, Ascending)), (Month, (Numeric, Ascending)) ))

Gestion-PSD
Creator II
Creator II
Author

Hi Bruno

It doesn't work.

With TOTAL in that position, the table shows te total sum (4123876) in all rows.

Moreover, if I try to put "Total" modifier after Rangesum(, the result is all zeros; and if I try to put it as sum(total Sales), results are also wrong.

 

Thanks,

Alonso Torres.