-
1. Re: Finding Last Time Stamp from Daily Data
Simon RuncJan 6, 2018 9:45 AM (in response to Shivi Bhatia)
hi Shivi,
So this should do the trick for you.
I created the following calculation, using a FIXED LoD
[Last Record per Day]
IF [Time of computation] =
{FIXED DATETRUNC('day',[Time of computation]): MAX([Time of computation])}
THEN [Total Cases] END
Hope that is what you were after, and makes sense. Let me know if not.
-
Last Record of Day.twbx 49.9 KB
-
-
2. Re: Finding Last Time Stamp from Daily Data
Shivi Bhatia Jan 6, 2018 11:07 AM (in response to Simon Runc)Hi Simon,
Thank you for your assistance. this has almost worked. I tried it with the data i had supplied and i get the below view.
As you can see this shows NULL for any data point which is not the last value for that given day, i have placed last record field on filters and selected Special as "Non Null Values". This does the trick.
Thank you for your time and help.
Regards, Shivi
-
3. Re: Finding Last Time Stamp from Daily Data
Simon RuncJan 6, 2018 11:50 AM (in response to Shivi Bhatia)
1 of 1 people found this helpfulCool, glad it helped.
Yes that's what it's supposed to do! As it only populates the row that is the last entry, if you set the [Time of computation] to Day Level, and bring this field in...each day will just add up to the last record for each day. Just means that this field is additive (which can be useful).
Equally if you only want the last record for each day
Set up a calculation, like the below...bring it onto the filter shelf and set to true
[Time of computation] = {FIXED DATETRUNC('day',[Time of computation]): MAX([Time of computation])}
you can then just use the original cases field, as all the non-last record will be filtered out....always lots of way to solve a problem in Tableau!
-
4. Re: Finding Last Time Stamp from Daily Data
Shivi Bhatia Jan 9, 2018 8:04 AM (in response to Simon Runc)Thank you Simon, this is very useful.
Really appreciate your help on this.
Regards.