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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show data against the latest date only?

Hi All,

How can i show only the data against the latest date from an spread sheet. The data would be as follows:

Customer               DATE                     SCORE

       A                  4/15/2015                      60

       B                  4/15/2015                      50

       A                  6/15/2015                      55

       D                  6/15/2015                      40

I would only need to show the records against 6/15/2015

TIA!!

15 Replies
Not applicable
Author

Reddys310

Any idea on this issue.

Basically i have  customer, Score and date Columns in an spread sheet. I would need to get the score of the every customer on the latest date.

sunny_talwar

May be this:


Dimension

Customer


Expression

FirstSortedValue(DISTINCT Aggr(Sum(NPS), Customer), -Date)


Capture.PNG

sunny_talwar

Updated my last post. See if that is what you are looking for: Re: How to show data against the latest date only?

reddy-s
Master II
Master II

Hi Sai Kumar,

The firstSortedvalue() function should be able to solve your issue. Sunny's Reply should help you with the syntax.

Thanks and Regards,

Sangram Reddy.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

Data:

LOAD

*

FROM DataSource;

LEFT JOIN(Data)

LOAD    

     Customer,

     Max(Date) AS Date,

     1 AS MaxDateFlag

RESIDENT Data

GROUP BY Customer;

Now use below expression for getting the score of Customer of latest Date

Sum({<MaxDateFlag={1}>} SCORE)


Hope this helps you.

Regards,

jagan.

jagan
Partner - Champion III
Partner - Champion III

sunindia


Reddys310


It is not suggested to use FirstSortedValue(), because it returns Null value sometimes when there is a duplicate records.


Regards,

Jagan.