
1. Re: Calculate a delta (value of current week minus value of last week)
Norbert Maijoor Jan 26, 2017 6:48 AM (in response to laura.vanzutphen)Goedemiddag Laura,
"Ben niet zeker" maar find my approach as reference below and stored in attached workbook version 9.3
RUNNING_SUM(ZN(SUM([Rate]))  LOOKUP(ZN(SUM([Rate])), 1))

Delta.twbx 10.8 KB


2. Re: Calculate a delta (value of current week minus value of last week)
laura.vanzutphen Jan 26, 2017 6:52 AM (in response to Norbert Maijoor)Hi Norbert,
Thanks for your suggestion. However, I only need the difference between the current week and the last week.
In your table I see that for Bank A the Delta amounts 0.10% on both 812017 and 1512017, while it should be 0% at 1512017.

3. Re: Calculate a delta (value of current week minus value of last week)
Norbert Maijoor Jan 26, 2017 6:56 AM (in response to laura.vanzutphen)Hi Laura,
No problem then the calculation should be ZN(SUM([Rate]))  LOOKUP(ZN(SUM([Rate])), 1)

4. Re: Calculate a delta (value of current week minus value of last week)
laura.vanzutphen Jan 26, 2017 7:53 AM (in response to Norbert Maijoor)Thanks Norbert, this was exactly what I was looking for!

5. Re: Calculate a delta (value of current week minus value of last week)
Norbert Maijoor Jan 26, 2017 7:42 AM (in response to laura.vanzutphen)Laura,
Your are welcome. Thanks for the "Awards". Fijne avond gewenst

6. Re: Calculate a delta (value of current week minus value of last week)
laura.vanzutphen Jan 30, 2017 5:38 AM (in response to Norbert Maijoor)Just one addition to this question you had the answer to:
I only want to see the latest data (the current week). If I hide the previous week (by using a filter on the Datefield and set it to MAX) then the deltafield does not work anymore.
Any clue how to solve that?

7. Re: Calculate a delta (value of current week minus value of last week)
Norbert Maijoor Jan 30, 2017 6:10 AM (in response to laura.vanzutphen)Goedemiddag Laura,
Find my approach based on two separate calculated fields.
a. Current week: if DATEdiff('week',[Date],today())=0 then [Rate]/100 END
b. Current week 1: if DATEdiff('week',[Date],today())=1 then [Rate]/100 END
c. Delta vs Previous week: sum([Current week 1])sum([Current week])

Delta vs previous week.twbx 14.1 KB
