I need to chart a running total of a dataset. The only way I found how to make running totals is using a repeating group and summing up to current cell. But there is no way to chart this unless I somehow save the repeating group cells into a list.
Can someone help me figure out a way to chart running totals of a dataset?
Let’s take an absurd example of calculating the cumulative age of users. So, our RG will be:
Adam - 20 - 20
Ben - 25 - 45
Charlie - 23 - 79
Have a repeating group with your data (let’s call it Repeating Group Users)
Have a hidden repeating group in a popup somewhere which is a list of numbers (Repeating Group User's:each item's age). Let’s call this var (variable) - list of ages
Within each cell of the repeating group, to display the cumulative age, do var - list of ages:items until Current cell's index:each item's sum. So, in cell 2, it will dispay the sum of 20 and 25. In cell 3, it’ll display 20 + 25 + 23.
Now, to apply that to a chart, you have to do some funky logic. The problem is to put in a chart, you need a list of numbers. So, how do we go from a list of data types to a list of numbers that we can pass into a chart? It’s best to see my demo here:
What are you extracting with regex and why?
I figure this is just a index counter but not sure why we cant just do without the extract. Sorry but I am an obvious newb…