Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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!
You probably need to use
=max(ContactDate)
for Last Date Contact
if there is more the one distinct value then it will return null , use max(ContactDate)
try these maybe, untested***
Last Date Contact = MAX(ContactDate) or LASTSORTEDVALUE(ContactDate)
Latest Comment = LASTSORTEDVALUE(Comment,-ContactDate)
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
Thanks and when I used LASTSORTEDVALUE it's showing expression error. please help me what is this error.
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)
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)
Thanks and when I used max(ContactDate) it's showing incorrect values. Any help please as I need to sort this very urgent.