In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Trying to find the Date Difference using the Multi-Row Formula

jeprime
8 - Asteroid

I am struggling to calculate the dates of service between two dates. While I believe there is something simple I am missing, it evades my comprehension. I am using the multi-row formula to attempt to calculate the datetime differences between two dates adjacent in the same column. My results is always null, and I cannot understand why. I even tried to just make a simple calculation for an end date using the formula function and then calculating the difference using the multi-formula tool - still results in null. Any help?

 

Workflow Example:

workflow example date diff.png

Workflow Input:

 

sample input.png

 

Workflow Results:

 

workflow results.png

 

 

11 REPLIES 11
TimN
13 - Pulsar

How about this...

cjaneczko
13 - Pulsar

Check the configuration? Seems to work ok with the below config. 

 

image.pngimage.pngimage.png

TimN
13 - Pulsar

Looks exactly the same as yours but worked for me...  

jeprime
8 - Asteroid

The issue was that I had marked the Group By marked on the variable DateTime_Out . 

issue problem.png

 

When I unmarked it, it worked perfectly.  See corrected example:

issue solution.png

and corrected results:

 

workflow solution results.png

 

 

jeprime
8 - Asteroid

Thanks - I noticed that in your configuration, you did not select a group by from the table. I unselected it from mine and it worked perfectly. Much appreciated!

jeprime
8 - Asteroid

Your example also proved that one simple error can mess up the entire thing, AND that collaboration in developing is pertinent to good programming. Thanks so much. 

jeprime
8 - Asteroid

Now that the initial problem has been solved, I wonder if anyone could provide an answer as to when the GROUP BY portion would be best utilized and for what purpose?

TimN
13 - Pulsar
LiliR
5 - Atom

Hi, I have an issue related to the multi row formula. In my case I'm grouping two records/rows by the name of a client and I'm using the difference formula between dates. In the majority of cases I have two records for the same client and I can find the days between records, but I get a null value when there are no prior records. What can I do when there is not a prior record of that client and instead of getting null, I want to get zero days? Thanks!

 

 

Labels
Top Solution Authors