Hi Everyone,
I need to calculate Rolling YTD Gross Profit Percentage (GP%) in a line chart for the current year (2023).
The requirement is to show the line chart on a monthly basis as per the below logic:
For example:
1) January 2023:
January GP % =
January GP / January Sales Amount
2) February 2023:
February GP % =
(January GP + February GP) / (January Sales Amount + February Sales Amount)
3) March 2023:
March GP % =
(January GP + February GP + March GP) / (January Sales Amount + February Sales Amount + March Sales Amount)
.
.
.
.
Up to December 2023
What is the best approach to achieve this?
TIA,
Sri