Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Max date in expression

Hello,

I have dimensions ItemId, InventLocaionId, ValidateDate, InventBachId, how I can find MAX Transdate in expression, if I need MAX TransDate by InventBachId ?

1 Solution

Accepted Solutions
Highlighted
Champion
Champion

so try this:

=aggr(NODISTINCT Max(Date(TransDate)),InventBachId)

View solution in original post

6 Replies
Highlighted
Champion
Champion

Hi,

can you attach some data ?

you want to display max date on a column as expression or you want to filter with max date inside an expression ?

Highlighted
Contributor III
Contributor III

I want show it in column as expression.

Highlighted
Champion
Champion

so if your Transdate column is formatted as a date, you can simply use Max(Transdate), if not, use: Max(Date(Transdate))

Highlighted
Contributor III
Contributor III

Some data:

ItemId     InventLocationId     ValidateDate     InventBachId     TransDate

111          A                         12/12/2017          X                    10/12/2017

111          B                         13/12/2017          X                    11/12/2017

111          A                         13/12/2017          X                    12/12/2017

111          A                         20/01/2018          Y                    14/12/2017

I need to find:

ItemId     InventLocationId    InventBachId     MaxTransDate

111          A                         X                    12/12/2017

111          B                         X                    12/12/2017

Excluding InventLocationId MAX TransDate of X is 12/12/2017

Highlighted
Champion
Champion

so try this:

=aggr(NODISTINCT Max(Date(TransDate)),InventBachId)

View solution in original post

Contributor III
Contributor III

Thank you Youssef