Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

MAX(AGGR(COUNT(Expression),Dimension)) is not working properly

Hi,

I'm losing my mind over this issue. The expression MAX(AGGR(COUNT(Operation_Idnum),Daynum)) is not working in a simple inline table as it is bringing me nulls in one of the dimensiones (that's not correct according to the data) and I'm losing my sanity searching for the reason.

I am really grateful for the help in advance. Kind regards.

Evidence.PNG

I attach the qvf file wih the object and the issue.

The expression is MAX(AGGR(COUNT(Operation_Idnum),Daynum)), the dimension is OrderType.

The inline table is:

Test:
LOAD * Inline [OrderType,Daynum,Operation_Idnum
B,1,8923,Oct
B,1,8924,Oct
B,1,8925,Oct
B,2,8926,Oct
B,2,8927,Oct
A,1,8928,Oct
A,1,8929,Oct
A,2,8930,Oct
A,2,8931,Oct
A,2,8932,Oct
B,1,8933,Nov
B,1,8934,Nov
B,1,8935,Nov
B,2,8936,Nov
B,2,8937,Nov
A,1,8938,Nov
A,1,8939,Nov
A,2,8940,Nov
A,2,8941,Nov
A,2,8942,Nov
];

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi

when using aggr function the function disregards the dimensions of the table 

so if you want to include the order type in the results you need to change the function to 

MAX(AGGR(COUNT(Operation_Idnum),Daynum,Order_Type))

or if you want to get the same result to all order type change to this one 

MAX(AGGR(nodistinct  COUNT(Operation_Idnum),Daynum))

View solution in original post

1 Reply
lironbaram
Partner - Master III
Partner - Master III

hi

when using aggr function the function disregards the dimensions of the table 

so if you want to include the order type in the results you need to change the function to 

MAX(AGGR(COUNT(Operation_Idnum),Daynum,Order_Type))

or if you want to get the same result to all order type change to this one 

MAX(AGGR(nodistinct  COUNT(Operation_Idnum),Daynum))