Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sri251
Contributor II
Contributor II

Calculation of Rolling YTD Gross Profit Percentage

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

Labels (1)
0 Replies