Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Sum consecutive values

Highlighted
6 - Meteoroid

Hello,

 

There is a table with a large amount of values taken every 15min. I would like to sum them in order to obtain one value per hour.

 

For example, the original table is:

            DATE                          VALUE

2020-04-01 06:00:14                  15

2020-04-01 06:15:14                  20

2020-04-01 06:30:14                  05

2020-04-01 06:45:14                  10

2020-04-01 07:00:14                  15

2020-04-01 07:15:14                  20

2020-04-01 07:30:14                  10

2020-04-01 07:45:14                  30

etc

 

The result could be something like this (although the null values are no longer needed):

              DATE                         VALUE          SUM

2020-04-01 06:00:14                  15                50

2020-04-01 06:15:14                  20                null

2020-04-01 06:30:14                  05                null

2020-04-01 06:45:14                  10                null

2020-04-01 07:00:14                  15                75

2020-04-01 07:15:14                  20                null

2020-04-01 07:30:14                  10                null

2020-04-01 07:45:14                  30                null

etc

 

I would like to remove the null values, so that the final result could be:

                DATE                       VALUE          SUM

2020-04-01 06:00:14                  15                50

2020-04-01 07:00:14                  15                75

etc

 

Is it possible? I'm a new Alteryx user and I've trying for hours with no success.

Thanks in advance!

 

Adolfo

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Adolfo ,

 

I think, you should "round" the time to the hour level using the DateTimeTrim function, summarize the values and keep the first date for each hour. I've attached a sample workflow. Let me know if it works for you.

 

Best,

 

Roland

Highlighted
Alteryx Partner

This is how I would do it @Adolfo Workflow attached

joshuaburkhow_0-1587123643323.png

 

Highlighted
Alteryx Partner

That's hilarious @RolandSchubert Literally same solution 😉 Great minds....

Highlighted
6 - Meteoroid

Thank you very much Roland!!!

 

It works perfectly 🙂

Labels