Logic in MTD/YTD

Kayleigh

Member
Local time
Today, 21:56
Joined
Sep 24, 2020
Messages
709
Hi
Hope someone can help me find clarity in an issue I am having with a dynamic report.

For each row of data, I am calculating the Current week, month to date (MTD) and year to date (YTD) values. This works fine where the same month and year are throughout the current week. However if I would have a week like this one where new month starts in middle it will still be showing last month's data as it goes by date commencing.
If I were to set MTD/YTD according to today's date, it would restrict to this month/year but the report is dynamic - user can select what week they wish to view.

The initial values of Week commence / MTD and YTD are set according to VBA values generated on load event.

Would appreciate if anyone can shed light on my dilemma.
 
Can you give us some sample data to demonstrate your issue? Be sure to give us the edge cases as well as the dates immediately prior and after them to demonstrate your issue.
 

Users who are viewing this thread

Back
Top Bottom