44
Views
3
Comments
Solved
Cumulative Chart
Question

Hi guys, I want to create a Cumulative Line Chart that will add a value to the next value. 
For example, the data are:
January - 3

February - 2

The graph will show January - 3 and February - 5. Is it possible to be done? If so, please help with my problem. Thank you!


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Afiq,

A chart shows whatever value you have in the data points. So if the database returns "January - 3; February - 2", you need to create a DataPoint List that has "January - 3; February - 5". That probably means looping over a list and adding the value of the previous item to the current.

UserImage.jpg
Afiq Murad

as Kilian suggested, I have made a looping for the data


Have 2 Local Variable for a temp store data ( one has type Long Intenger and other one is Datapoint)  and assign them

Then Append the list from the Local Variable to the Variable that you will use for the graph


Hope others will find this useful

2022-05-11 15-38-46
Diogo Pacheco

Hey Afiq!

To create a chart you will need a list of DataPoints right? Each record of the DataPoints List will have (at least) the Label, that will refer to your months, and the Value that will be filled in with the value that you want to show. With that said, you just need to grant that on the Value you will have the data that you need. If you are doing your DataPoints List with a query you need to grant that it is cumulative. If you are doing it with a cycle you need to keep the previous value and add the new value to it. It is quite easy to do! Hope that it is more clear to you now.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Afiq,

A chart shows whatever value you have in the data points. So if the database returns "January - 3; February - 2", you need to create a DataPoint List that has "January - 3; February - 5". That probably means looping over a list and adding the value of the previous item to the current.

UserImage.jpg
Afiq Murad

as Kilian suggested, I have made a looping for the data


Have 2 Local Variable for a temp store data ( one has type Long Intenger and other one is Datapoint)  and assign them

Then Append the list from the Local Variable to the Variable that you will use for the graph


Hope others will find this useful

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.