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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
GianluigiBI
Contributor
Contributor

Aggr Max(Date)

Hi guys, 
i have this formula that is not working correctlly: 

Sum({$<unload_flag_50={"=1"}, date={"$(=Aggr(Max(date)),shop)"}>} [account_balance_eur])

The point is that I need to Aggregate Max(date) for each shop, and than take the sum. 
Why it isn't working? Any ideas?

Labels (6)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Try

=FirstSortedValue(Aggr(Sum({$<unload_flag_50={"=1"}>} [account_balance_eur]),shop,date),-date)

View solution in original post

5 Replies
BrunPierre
Partner - Master II
Partner - Master II

Try

=FirstSortedValue(Aggr(Sum({$<unload_flag_50={"=1"}>} [account_balance_eur]),shop,date),-date)

agigliotti
Partner - Champion
Partner - Champion

Hi @GianluigiBI ,

What object type are you using for that expression?

GianluigiBI
Contributor
Contributor
Author

Thaks so much, it is working!

GianluigiBI
Contributor
Contributor
Author

I found that it doesn't work well with negative values
BrunPierre
Partner - Master II
Partner - Master II

@GianluigiBI Can you elaborate?