Creating a Cumulative visual

Scenario: i own a shop which is selling types of fruits. currently, the options are apple and banana. i have a field named resultdesc, which tells me if the person wants an apple or banana. i have created a calculated field named resultdesc_count to change this into an integer, by assigning it to either 1, or -1. using this, how can i create a cumulative graph which tells me the cumulates the results over days so i can see how its growing. i also want this to be in 2 colours, to represent apple and banana.
so if day 1 i sell 15 bananas and 12 apples, day 2 i sell 5 apples and 2 bananas, and day 3 i sell 12 apples, 17 bananas, it should display:
Day 1: 27
Day 2: 34
Day 3: 63
however colour coded to type of fruit

code to resultdesc_count:
ifelse(ResultDesc = ‘Apple’, 1, ifelse(ResultDesc = ‘Banana’, -1, 0))

Hi @HarveyB-B
Can you please share the columns in your dataset? you can also explore, runningSum function. If you can list columns, it will be easy to suggest the appropriate formula.


this is what i looks like, added a new fruit named cherry aswell. it is simple but as someone who is knew to quicksight, i do not know how to cumulate visuals with quicksight.
Hope this helps, if not please reply with anything else you need


the data is stored in tmp_fruit_stack

this is the code for it:
ifelse({flag_Banana}=1, “Banana”,{flag_Apple}=1 , “Apple”, {flag_Cherry} = 1, “Cherry”, “Other”)

the flag_banana flag_apple etc is the calculated field which flags from the database what they ordered.
Here is the code for it (same concept for the other flags aswell):


was there any updates on the appropriate formula for this? have been playing around but cant find anything which works


Hi Vetri, not sure if you’ve seen my replies. i did attach an image of what it looks like. Just checking on an update for a solution.