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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last Date Contact is showing blank values

Hi,

I have straight table with columns Last Date Contact and Latest comment

and to populate this I used

Last Date Contact= ContactDate

Latest Comment= FirstSortedValue(Comment,-ContactDate)

These two columns are from same table and the table is in access database. The problem is Last Date Contact is showing blank values for some of the Latest Comment eventhough the dates are present in table.

Could nayone help me do I need to change anything in expression to populate date for each comment.

Thanks.


17 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Do you have more than one comment per contact date?

Is ContactDate a dimension?  If so you could use Concat() instead of FirstSortedValue()

EDIT:  Oops - I didn't read the post properly and thought you meant some of the comment rows were blank. Other responses are more relevant than mine!

swuehl
MVP
MVP

You probably need to use

=max(ContactDate)

for Last Date Contact

lironbaram
Partner - Master III
Partner - Master III

if there is more the one distinct value then it will return null , use max(ContactDate)

rustyfishbones
Master II
Master II

try these maybe, untested***

Last Date Contact = MAX(ContactDate) or LASTSORTEDVALUE(ContactDate)

Latest Comment = LASTSORTEDVALUE(Comment,-ContactDate)

Not applicable
Author

Thanks for your prompt reply and it's showing some incorrect values in some comments and also if the latest comment is having Date means then Latest comment is showing Blank value. Is there any problem in Latest comment please let me know

i,e I have to show

for eg:

Last Date Contact=15/10/2013


Latest Comment= 23/10/2013

Not applicable
Author

Thanks and when I used LASTSORTEDVALUE it's showing expression error. please help me what is this error.

swuehl
MVP
MVP

There should be no issue with using a date as comment.

But if you may have several distinct Comment values for the same sort weight (ContactDate), FirstSortedValue will return NULL. Try adding a DISTINCT qualifier to see if this might be the cause:

FirstSortedValue(DISTINCT Comment,-ContactDate)

Not applicable
Author

Thanks and if I am using FIRSTSORTEDVALUE(DISTINCT Comment,-ContactDate) it's showing Error in expression.

Please help and also the Last date Contact is showing incorrect date values when using =Max(ContactDate)

Not applicable
Author

Thanks and when I used max(ContactDate) it's showing incorrect values. Any help please as I need to sort this very urgent.