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.

How to calculate a field that uses it result in calculation?

df
8 - Asteroid

Hello,

 

i have some data and a formula tool which creates a column "result".

But in the result calculation i would like to add the Sum of previous results.

But not row specific but the last 5 minutes. (so the needed rows can change)

 

For example i would like this:

 

df_1-1674211030402.png

 

How could i achieve this?

Do i need a interativ macro or is there some default tool that could help?

Best,
David

 

5 REPLIES 5
ShankerV
17 - Castor

Hi @df 

 

One quick question, do you need the result to be displayed in all rows for previous five minutes?

From row 11 to 21?

 

Many thanks

Shanker V

df
8 - Asteroid

Hi @ShankerV,

 

yes. Every row needs to have a result.

 

The calculation needs the sum of previous five minutes.

 

So for e.g. row 23 i need the sum result of row 11 till 21.

 

Best,
David

 

RobertOdera
13 - Pulsar

Hi, @df 

 

I used a time anchor hard code of '2022-01-01 10:05:00' for this.

If your actual flow has dynamic date timestamps, update your sample and I will work on an adaptive workflow solution.

 

Please take a look at the below.

Please mark it as an acceptable solution if it works for you.

Cheers!

 

For_Df.PNG

df
8 - Asteroid

Hi @RobertOdera 

Thanks for your Workflow.
Its not exactly what i was looking for. Because it does not go through all timestamps.

But i could solve this today with using an iterative makro and a batch makro inside the interative makro.

Best
David

RobertOdera
13 - Pulsar

Yes, sure thing @df!

 

You can use an iterative macro, and you can use generate rows to achieve dynamic flows.

It helps the community immensely if you articulate your problem statements and if your samples provide the scenarios you anticipate 👍

Cheers!

Labels