Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

Aggr

Hi all,

Below is my script and chart details

ProductData:

LOAD * inline [

Customer|Product|UnitSales|UnitPrice

Astrida|AA|4|16

Astrida|AA|10|15

Astrida|BB|9|9

Betacab|BB|5|10

Betacab|CC|2|20

Betacab|DD|25|25

Canutility|AA|8|15

Canutility|CC||19

] (delimiter is '|');

 

Chart Dim: Product

Chat exp : Aggr(Sum(UnitSales), Customer)

manoranjan_d_0-1613929423653.png

For AA,CC,DD I  m getting Null value which is not correct and please sort out this issue

 

my expected o/p is 

manoranjan_d_0-1614264834550.png

 

Labels (3)
9 Replies
manoranjan_d
Specialist
Specialist
Author

Any experty can help me on this

Saravanan_Desingh

The Null shows that there are more than one Customer for that Product.

You can simply use Sum(UnitSales)

commQV11.PNG

 

If your requirement is different, then let me know the expected result.

manoranjan_d
Specialist
Specialist
Author

I tried with same scenario like  one employee name with different company where its getting correct.

PFA 

 

 

manoranjan_d
Specialist
Specialist
Author

Hi saran or qlik experty waiting for ur reply to understand aggr

manoranjan_d
Specialist
Specialist
Author

updated my expected o/p in the  first post

manoranjan_d
Specialist
Specialist
Author

you can download the files in my thread i shared , which have two scenarios of aggregation  one is passed and one is failed. 

required o/p for failed scenario :  

 

manoranjan_d_0-1614265190382.png

 

 

manoranjan_d
Specialist
Specialist
Author

Any qlik experty to reply for aggr function

Saravanan_Desingh

Your Chart has Dimension - Product.

But your Expression has Dimension as Customer. Please correct this.

Try this:

Chart Dim: Product, Customer

Chat exp : Aggr(Sum(UnitSales), Customer, Product)

 

Also I could not understand how you are getting 23 for AA.

 

manoranjan_d
Specialist
Specialist
Author

its simple aggr function i dont want to add the customer.

i want to understand the aggr function.

 

if see  in to excel file same concept with different data , there it is passing , but where else in customer, product,sales data its falling see the difference  in the Qlik file.

 

 

Community Browser