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: 
marishnagendran
Creator
Creator

Aggr using 2 dimension

Dear All,

ProductCustomerQtyAGGR(Sum(Qty)/2,Product)
    
Product ACustomer A1035
 Customer B20 
 Customer C30 
 Customer D10 
Product BCustomer A2050
 Customer E50 
 Customer F30 

 

Last AGGR function is used for sum of Quantity for each product and divide by 2 is my bench march for that product. i want to compare value for each customer

For Example

Product A Bench mark sales is 35

All customer bought the qty below 35 so i want color it(Customer A,B,C,D)

Product B Bench mark sales is 50. 

Customer A and Customer F I want to color it

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try adjusting your expression with NoDistinct like this:

AGGR(NODISTINCT Sum(Qty)/2,Product)

 

View solution in original post

6 Replies
Vegar
MVP
MVP

Try adjusting your expression with NoDistinct like this:

AGGR(NODISTINCT Sum(Qty)/2,Product)

 

marishnagendran
Creator
Creator
Author

Thanks vegar

It's Working.

Is there any possible to hide Customer E Transaction in front-end??

Vegar
MVP
MVP

You can't exclude them from the application, but you can exclude them from
you expressions by using SET analysis.

Example:
=SUM({< Customer -={'Customer E'} >}Qty)
marishnagendran
Creator
Creator
Author

No I'm not asking like that

ProductCustomerQtyAGGR(NoDistinct Sum(Qty)/2,Product)
    
Product ACustomer A1035
 Customer B2035
 Customer C3035
 Customer D1035
Product BCustomer A2050
 Customer E5050
 Customer F3050

 

Now the transaction table comes like this.

If Qty and AGGR(Nodistinct Sum(Qty)/2,Product) column is equal or above the value that transaction i want to remove in my front end it is possible??

marishnagendran
Creator
Creator
Author

Anyone is this possible???

Vegar
MVP
MVP

What if you f do like this
Change the expression to something like the following?

If(Qty < AGGR(Nodistinct Sum(Qty)/2,Product),
AGGR(Nodistinct Sum(Qty)/2,Product),
Null())