Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
eabis1
Contributor
Contributor

Accumulating across a dimension when certain conditions are met

ExampleData:
load * Inline
[
DATE_STAMP, Group, Value
01/31/2024, a, 5
01/31/2024, b, 10
01/31/2024, hist, 8
02/29/2024, b, 60
02/29/2024, hist, 75
]
;

Using the example data above, I need to create a table that calculates "y" by Scenario like shown below.  Column "y" should sum values from records where Scenario = 'hist' for all date stamps if the date stamp has data for the specific scenario and for scenario=hist.  In this example, Scenario='a' only has data for Jan so the value for y does not include Feb data from Scenario='hist'.  It is like joining the Scenario='hist' data to all the other scenarios by date stamp, but I need to do this in the visualization (not the script).  Can this be done?

Scenario y
 a  8
 b  83
 hist  83
Labels (1)
0 Replies