Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Restructure Logic for clients with date

julianhoetzel
8 - Asteroid

Hi guys, 

 

I need help regarding the following problem: 

 

 

Client_NumberDateFinance Amount
12021-01-01100
22021-01-01200
32021-01-01300
42021-01-01400
12021-01-02100
32021-01-02300
42021-01-02400
12021-01-03100
32021-01-03300
42021-01-03400
52021-01-03500

 

Output should look like the following

 

So it should not include the ones that are added later with a "0" amount like client 5, but should null the amount of those that were in the table before like client 2

Client_NumberDateFinance Amount
12021-01-01100
22021-01-01200
32021-01-01300
42021-01-01400
12021-01-02100
22021-01-020
32021-01-02300
42021-01-02400
12021-01-03100
22021-01-030
32021-01-03300
42021-01-03400
52021-01-03500

 

Cheers

Julian

11 REPLIES 11
mceleavey
17 - Castor
17 - Castor

Hi @julianhoetzel ,

 

the logic here doesn't follow. Could you explain more about what you're trying to do here. There doesn't appear to be consistent logic.

 

M.



Bulien

mceleavey
17 - Castor
17 - Castor

Hi @julianhoetzel ,

 

I think I understand now.

You want to include every Client Number up to the max number for that date. If they aren't there, then create them with a value of zero.

 

I've built it to do this as follows:

 

mceleavey_0-1623773589883.png

 

mceleavey_1-1623773611259.png

 

 

I hope this helps,

 

M.

 



Bulien

julianhoetzel
8 - Asteroid

Hi,

 

so a new client should appear in the dates but with a "0" when the client does not appear in the list the following day. 

A new client should not appear in the past. 

It's about consistency that every client shows up in the future even though the client does not show up in the actual list (First table)

 

Does that makes sense?

 

 

 

mceleavey
17 - Castor
17 - Castor

@julianhoetzel ,

 

try that above.

 

M.



Bulien

Maskell_Rascal
13 - Pulsar

@mceleavey 

 

I was thinking of something along the same lines as your example workflow, but got stuck when it comes to a practical application. I'm just gonna assume that the client numbers aren't perfectly sequential, so I'm not sure how to handle for that. Any thoughts?

mceleavey
17 - Castor
17 - Castor

Hi @Maskell_Rascal ,

 

Yeah, as above I used the sum tool to determine the max number for each date, then appended to create the valid combinations. This should work, but as you say, it is based on the Customer Numbers being sequential. However, you can get around this by using a RecordID tool.

 

M.



Bulien

julianhoetzel
8 - Asteroid

The client number is not the sum of clients it is rather a unique identifier like client number 2003432 or ABC123. Does that make more sense?

 

mceleavey
17 - Castor
17 - Castor

@julianhoetzel ,

 

I didn't create a sum. Can you confirm that worked?

 

M.



Bulien

mceleavey
17 - Castor
17 - Castor

@julianhoetzel ,

 

I've now made it dynamic without using the max client number. This should work now.

 

mceleavey_1-1623775945476.png

 

 

mceleavey_0-1623775927673.png

 

 

M.



Bulien

Labels