Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
StewStremel
Contributor
Contributor

How to Filter rows based on max(date) for aggregation in Qlik Sense Web

Hello,

I have been reading through the various entries on how to filter/aggregate data based on the last/greatest date entry but I still can't seem to get it to work and need some help from the community.

Data

Collab.Country ISO CodeCollab.Supply Plan BucketItem.L5[SupplyPlan.Measure][SupplyPlan.Date]=Sum(
  {<
    [SupplyPlan.Measure]={"InventoryCustSite"}
    >}
    [SupplyPlan.Quantity]
)
AFBUCKET-BDepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite9/1/2017894,175
AFBUCKET-BDepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite6/1/2017260,250
AFBUCKET-BDepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite3/1/2017339,240
AOBUCKET-ADepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite3/1/20194,028,526
AOBUCKET-ADepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite12/1/201823,027,010
AOBUCKET-ADepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite9/1/201857,716,148

 

Desired

Collab.Country ISO CodeCollab.Supply Plan BucketItem.L5[SupplyPlan.Measure][SupplyPlan.Date]=Sum(
  {<
    [SupplyPlan.Measure]={"InventoryCustSite"}
    >}
    [SupplyPlan.Quantity]
)
AFBUCKET-BDepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite9/1/2017894,175
AOBUCKET-ADepot Medroxyprogesterone Acetate 150 mg/ml (1ml) Vial, IntramuscularInventoryCustSite3/1/20194,028,526

 

Attempted Expression:

=Sum(
{<
[SupplyPlan.Date]={"(=RangeMax([SupplyPlan.Date]))"},
[SupplyPlan.Measure]={"InventoryCustSite"}
>}
[SupplyPlan.Quantity]
)

However the result is no rows at all.  What am I missing?

thanks!

0 Replies