Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
azmeerrehan
Partner - Creator
Partner - Creator

Aggr Function Issue

I have a straight table  and I am using this expression

SUm(Aggr(

If(sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)>

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)),Prod_Variety_Number))

My Dimension is Prod_Variety_Number, but I am loosing rows when I am doing this expression.

Any idea what am I doing wrong?

15 Replies
Anil_Babu_Samineni

No Idea.. But, Try to use this and share screen where values are getting wrong?

If(sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)>sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
azmeerrehan
Partner - Creator
Partner - Creator
Author

Already tried this first

Anil_Babu_Samineni

Can you consider as expresions like

1) sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)

2) sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders)


And show image?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

May be this

Sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"}>} Aggr(

If(sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)>

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Order_Date)"},Production_Key={'Orders'}>} sum_orders),

sum({< LinkType = {'Production'}, Crop={'Corn'},Date = {"$(vMax_Prod_Prod_Date)"},Production_Key={'Production'}>} sum_floor_qty)),Prod_Variety_Number))

azmeerrehan
Partner - Creator
Partner - Creator
Author

Please se the attached . On top u see the results seperately and at the bottom I expect to see 1330390 cuz that  is not greater then sum orders

azmeerrehan
Partner - Creator
Partner - Creator
Author

Doesnt work, still missing rows

sunny_talwar

Would you be able to share a qvw sample?

Anil_Babu_Samineni

Validation looks Okay? Can you highlight where you getting wrong?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
azmeerrehan
Partner - Creator
Partner - Creator
Author

Can we do a screen sharing or something?