Making an accumulated sum graph with QuickSight
Asked Answered
S

2

12

How can I make an accumulated sum graph with AWS QuickSight? For example, I have a dataset that contains the sales for each day. I want to make a line graph for each month that has the accumulated sells day by day.

So if the dataset is:

  • Day1 = 10 sales
  • Day2 = 5 sales
  • Day3 = 11 sales

The graph should have a line with Day 1 = 10, Day 2 = 15, Day 3 = 26, etc.

There is a function function called runningSum() in the Quicksight documentation, but how can this be used with a QuickSight Visual (graph)?

Shingles answered 30/11, 2017 at 19:53 Comment(1)
You need to use a "Calculated Field". Unfortunately I can't add an answer because this question is closed.Leafage
E
7

I was able to find an answer to this. I did it the following way:

runningSum(sum({count}), [truncDate("MM",{creationdate}) ASC], [{region}])

and I found an interesting catch.... whenever I tried adding at the moment that I'm configuring the data source, it'd fail.

So I went through and added the calculated field on the area where I can edit the visuals - and there it worked.

Here's an example of the accumulative view:

accumulative view on quicksight

Hope it works for you.

Exeter answered 31/7, 2020 at 21:24 Comment(2)
For graphs QuickSight does not show the runningSum or runningCount fields. How did you add this? As a Parameter Calculated field? If so, how do you use that within the graphs?Cranial
Precisely, you first need to add a calculated field to you analysis - there’s a lot of functions that are exclusive to the formulas. Once you add a calculated field (I’ve provided an example of how the formula should look like) it will be available just like the other fields, you can drag it to use it as the Y axis of you graph.Exeter
B
0

have you tried using runningSum.

Bless answered 19/6, 2019 at 9:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.