Unfortunately that is resulting in the same error. Thank you for trying though, I appreciate it.
Ok, so your running sum is actually precalculated? In which case try this:
SUM([Running Total of Some Data]) - LOOKUP(SUM([Running Total of Some Data]),-1)
Yes, my running sum is pre-calculated as shown above.
For some reason I am just getting null for each row when entering that calculation.
1 of 1 people found this helpful
OK, so you'll need to troubleshoot what is happening calc by calc to see where your NULL is returned.
You should already have the [Running Total of Some Data] summed in your view.
Put this formula also into your view: ZN(LOOKUP(SUM([Running Total of Some Data]),-1)). I have wrapped it in ZN so any Null values (only the first should be null) is returned as 0 (zero).
Assuming both of those formulae are good combining them should work: SUM([Running Total of Some Data]) - ZN(LOOKUP(SUM([Running Total of Some Data]),-1))
If not there must some information missing causing it to fail, in which case please upload a twbx file to it can be investigated.
That is very close! It is kind of working. I've noticed that using MAX instead of SUM yields the best result because my [Running Total of Some Data] data is continuously being incremented. The maximum value represents the value for that time period.
Doing: MAX([Running Total of Some Data]) - ZN(LOOKUP(MAX([Running Total of Some Data]),-1))
Each one of [Running Total of Some Data] rows is associated with a timestamp. Lets say I have data from 9/25/2016 to today. If I want to display all the data for today, I'm adding a filter and it's almost working, but the first value is the actual value being measured. It should be the value being measured minus the last value of the previous day. This image may be helpful.
COLUMNS: DATEPART('hour', [EST Timestamp])
ROWS: MAX([Running Total of Some Data]) - ZN(LOOKUP(MAX([Running Total of Some Data]),-1))
FILTER: Have only today selected for the timestamp.
Thank you again. I'm very close to achieving what I want.
Glad you're almost there. Sounds like you have 1 thing left to do, to change your date filter. Instead of filtering on your date field filter on this calculated field instead: LOOKUP(ATTR([Date]),0)
Thanks for your help once again.
Unfortunately I cannot get it to work. I tried creating a calculated filed on my current [Timestamp] column with the calculation you gave me, but all values are null.
You should provide some sample data or at least a screenshot of your layout with rows and columns showing. This will provide more context and make it easier to help you.
Here is a file with some sample data and a Tableau file. The first sheet is correct, the second sheet isn't. Let me know if anything else would help or if I should upload it in a different way.