Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Sum consecutive values

Adolfo
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

4 REPLIES 4
RolandSchubert
16 - Nebula
16 - Nebula

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

joshuaburkhow
ACE Emeritus
ACE Emeritus

This is how I would do it @Adolfo Workflow attached

joshuaburkhow_0-1587123643323.png

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
joshuaburkhow
ACE Emeritus
ACE Emeritus

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

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Adolfo
6 - Meteoroid

Thank you very much Roland!!!

 

It works perfectly 🙂

Labels