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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Loreen
Contributor III
Contributor III

Ignore a filter with sum total aggr

Hi everybody, my issue  is the continuation of a previous post :
 
Hi everybody I'm new in the Qlikview Community. I have an issue and I haven’t figured it out yet so maybe you could help me. Here are my datas:
Product n°Salesman nameQtyQty recalculatedTotal quantity by product
1PT5515
1PL5515
1PM2215
1PO0315
2PT9974
2PL151574
2PM363674
2PO141474

 

I have  this expression for the column Quantity recalculated and it works: 

if($(v_Qty_LY)=0,($(v_Qty_Total_LY)/$(v_Nb_Salesman)),$(v_Qty_LY))

I tried to create an expression to calculate the total quantity by product but it doesn't count the value that replaced the 0.

For example, I don't find 15 but 12. Here is the expression that I created : 

Sum(Aggr(NODISTINCT($(v_Qty_recalculated_LY)),Material_Code))

 

Thanks in advance for your help

Regards 

Loreen

sunny_talwar
MVP  
 MVP
Re: Calculate Sum Aggr No distinct

May be try this

Sum(TOTAL <[Product n°]> Aggr(
If($(v_Qty_LY) = 0, ($(v_Qty_Total_LY)/$(v_Nb_Salesman)),$(v_Qty_LY))
, [Product n°], [Salesman name]))

This solution worked. But now, I'd like to keep the quantity total by product, even when I filter the salesman.

For example, when I filter the Salesman PT, I have

Product n°Salesman nameQtyQty recalculatedTotal quantity by product
1PT555
2PT999

 

And I'd like to have 

Product n°Salesman nameQtyQty recalculatedTotal quantity by product
1PT5515
2PT9974

 

I'd like to have the same result as with this expression

Sum(Aggr(NODISTINCT($(v_Qty_recalculated_LY)),Material_Code))

 

 except that this expression  does not take into account when the qty is recalculated, like I said in my previous post.

I tried by adding {<Salesman_name=,Salesname_Code=>} in my expression but it does not work.

Do you have any solution ?

Thanks in advance

Loreen

 

1 Reply
sunny_talwar

Where exactly did you use this in your expression?

{<Salesman_name=,Salesname_Code=>}

You have shared expressions with variables, can you share the expressions behind those variables?