Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to get the values of a field for the corresponding MAX Timestamp. This will be in straight chart. Below sample data:
DATECREATED | DEVICEID | RELEASENUMBER |
---|---|---|
2/9/2017 11:37:12 AM | 660206241268677 | 1.0.0.6 |
31/8/2017 4:43:41 PM | 660206241268677 | 1.0.0.5 |
31/8/2017 3:07:02 PM | 660206241268677 | 1.0.0.5 |
31/8/2017 11:52:06 AM | 867720587950660 | 1.0.0.5 |
31/8/2017 11:35:39 AM | 867720587950660 | 1.0.0.5 |
31/8/2017 11:25:27 AM | 867720587950660 | 1.0.0.5 |
31/8/2017 11:20:34 AM | 867720587950660 | 1.0.0.5 |
31/8/2017 10:34:42 AM | 867720587950660 | 1.0.0.5 |
31/8/2017 10:06:08 AM | 660206241268677 | 1.0.0.5 |
31/8/2017 9:15:36 AM | 660206241268677 | 1.0.0.5 |
The Straight Chart should be:
DEVICEID MAX(DATECREATED) RELEASENUMBER
660206241268677 2/9/2017 11:37:12 AM 1.0.0.6
867720587950660 31/8/2017 11:52:06 AM 1.0.0.5
Any advise?
How about if you add DISTINCT
FirstSortedValue(DISTINCT RELEASENUMBER, -DATECREATED)
Perhaps these as expressions?
1) Timestamp(Max(DATECREATED))
2) FirstSortedValue(RELEASENUMBER, -DATECREATED)
I still have a two fields which are causing issues - any idea how to exclude Product and LineItemSales from FirstSortedValue(RELEASENUMBER, -DATECREATED)?
you could try with aggr() function
Aggr(max(DATECREATED),DEVICEID)
Perhaps this?
FirstSortedValue({$<Product=, LineItemSales=>} RELEASENUMBER, -DATECREATED)
OR
FirstSortedValue({<FieldName -= {'Product', 'LineItemSales'}>} RELEASENUMBER, -DATECREATED)
Exclude Product and LineItemSales? What exactly do you mean?
Not returning what I'm looking for - this give the MAX date - which I've been able to get already
Still getting the same result on the first one and second is not correct
Then, I am with sunny.
What exactly your looking for ??