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: 
unification
Contributor
Contributor

Get Date of max sum Rate with grouping on Date

Hi Guys

How can i Get Date of max sum Rate with grouping on Date

Considering the table below

thanks for your guidance

 

TitleDateRate
A2019/01/0110
B2019/01/0115
C2019/01/0120
A2019/01/053
B2019/01/0516
C2019/01/0525
A2019/07/0158
B2019/07/0113
C2019/07/012
1 Solution

Accepted Solutions
Kushal_Chawda

can you try this expression

=FirstSortedValue(distinct Date, -aggr(sum(Rate),Date))

View solution in original post

4 Replies
Frank_Hartmann
Master II
Master II

Maybe like this?

1:
LOAD Title, 
     Date#(Date,'YYYY/MM/DD') as Date, 
     Rate
FROM
[https://community.qlik.com/t5/QlikView-App-Development/Get-Date-of-max-sum-Rate-with-grouping-on-Date/td-p/1666973]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);

NoConcatenate
Load Title, max(Date) as Date,sum(Rate) as Rate, FirstSortedValue(Rate,-Date) as Data Resident 1 Group by Title; DROP table 1

 

If this is not your expected output then please show how the table should look like.

unification
Contributor
Contributor
Author

no , i don't want to show a table

this table in my post is Sample of my data source

i want to get [Date] field of MAX(Summation(Rate) with Grouping (Aggr) on Date

Kushal_Chawda

can you try this expression

=FirstSortedValue(distinct Date, -aggr(sum(Rate),Date))

unification
Contributor
Contributor
Author

thanks 

your command return true result