Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
How can i Get Date of max sum Rate with grouping on Date
Considering the table below
thanks for your guidance
Title | Date | Rate |
A | 2019/01/01 | 10 |
B | 2019/01/01 | 15 |
C | 2019/01/01 | 20 |
A | 2019/01/05 | 3 |
B | 2019/01/05 | 16 |
C | 2019/01/05 | 25 |
A | 2019/07/01 | 58 |
B | 2019/07/01 | 13 |
C | 2019/07/01 | 2 |
can you try this expression
=FirstSortedValue(distinct Date, -aggr(sum(Rate),Date))
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.
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
can you try this expression
=FirstSortedValue(distinct Date, -aggr(sum(Rate),Date))
thanks
your command return true result