Forum Discussion
Calculating annual (& YTD) account credits from a dated record of monthly credits
Good morning PhraserB
I'm intrigued by how the current year to date total is constrained by the current date
This happens in the query that's the Source of the PivotTable
If you take a look at the Variant, query TableForPivot:
- At ttep ExpandedAccount ALL amounts are > 0 (inc. those in the future)
- Step CurrentPeriod calculates the EndOfMonth from today's date
- Step ReplacedAmount compares (row by row) if [Period] <= CurrentPeriod. If TRUE it keeps the [Amount] otherwise it replaces it with 0
- PhraserBMay 24, 2023Copper Contributor
Hi Lz…. Just a small update. Thank you for suggesting Excel Power Query as the way forward for me. I’ve been working through the information you posted together with some YouTube videos and have realised Power Query provides such an impressive problem solving method. Thank you again. Best wishes Fraser