Scenario: My Project data is extracted from the source system as a YTD total, not a current month total. But I want to show the spend for the current month. The only way I can get the current month's spend is to take the spend from the current month and subtract the spend from the previous month (i.e. Sept YTD minus Aug YTD will give me September's spend). How can I do this within a transform table which will then get appended to my Capital Project Master Data table?
I can do this in a metric, but I think from a reporting standpoint, it might not be optimal since, if my data source changes (which it has, BTW, and the new system gives me monthly spend values), then the metric will only calculate for the old data set, and I'd have bring in a new metric for the new data set, which is messy.
My thought was to use the LookupFromPath function, but I don't know if I can use it to get the prior date. Here's what I'm trying:
=If(CurrentDate("MMM")="Jan",Actual,Actual-LookupFromPath(DOMAINNAME() & “:” & PROJECTNAME() & “/Data/” & CURRENTDATE()-1 & "/ProSight Extract Transform",Identifier,Identifier,Actual))
So, if you're in January, then just take the January number, otherwise take the current number and subtract the prior month's number. This syntax isn't working, though. I don't know if it doesn't like the CurrentDate()-1, or if it's something else (maybe I'm causing a circular reference). If this can work, can someone correct my syntax? Or if not, are there any ideas for how I can accomplish this?