Alteryx Designer Desktop Discussions

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

Create a new column and default values

BobjiK
8 - Asteroid

Hello Everyone

 

I am new to Alteryx development. Kindly help.

 

This is the requirement.

 

a. Create a new column called Priority.

b. Sort the due date in ascending order.

c. If the Due Date <= Current Date Then that row alongwith all the previous rows, plus, the rows that falls on the next working day, must be marked as "P1" in the column Priority.

d. The above must be only for those rows where the invoice amount >= 500.

 

I have given the data below

 

Please help.

 

Thanks

Bobji

 

 

Duplicate GroupDue DateInvoice AmountPriority
19198913-01-20214,556.00 
19201217-03-2021500.00 
19210326-05-2021342.00 
19204411-09-2022456.00 
19201027-09-20225,670.00 
19201902-11-20222,939.00 
19196810-12-20223,949.00 
19200530-12-202212.00 
19202112-01-2023444.00 
19202420-01-2023333.00 
19199604-02-20235,959.00 
19197104-05-202329,293.00 
19199028-05-20233,98,484.00 
19201917-06-20233,434.00 
19198420-06-20237,878.00 
19199127-06-20233,434.00 
19192005-07-202367,776.00 
19191317-07-20234,556.00 
19192721-07-2023500.00 
19192726-07-2023342.00 
19193422-08-2023456.00 
19198025-08-20235,670.00 
19200725-08-20232,939.00 
19198729-08-20233,949.00 
19197909-09-202312.00 
19198316-09-2023444.00 
19201605-10-2023333.00 
19202609-10-20235,959.00 
19202212-10-202329,293.00 
19194214-10-20233,98,484.00 
19194214-10-20233,434.00 
19193714-10-20237,878.00 
19192516-10-20233,434.00 
19193916-10-202367,776.00 
19190317-10-20234,556.00 
19190217-10-2023500.00 
19192418-10-2023342.00 
19204621-10-2023456.00 
19197223-10-20235,670.00 
19200624-10-20232,939.00 
19190625-10-20233,949.00 
19186828-10-202312.00 
19194530-10-2023444.00 
19194530-10-2023333.00 
19193631-10-20235,959.00 
19197431-10-202329,293.00 
19199602-11-20233,98,484.00 
19204303-11-20233,434.00 
19199204-11-20237,878.00 
10 REPLIES 10
BobjiK
8 - Asteroid

Can someone please help

binuacs
20 - Arcturus

@BobjiK can you provide the expected output?

BobjiK
8 - Asteroid

Hi @binuacs 

 

This is the output I require

 

Current Date = 12 Dec 2023

The dates given below are all in the past but the invoice amount is more than 500. Hence, the column is marked as P1. The rest as P2

 

Duplicate GroupDue DateInvoice AmountPriority
19198913-01-20214,556.00P1
19201217-03-2021500.00P1
19210326-05-2021342.00P2
19204411-09-2022456.00P2
19201027-09-20225,670.00P1
19201902-11-20222,939.00P1
19196810-12-20223,949.00P1
19200530-12-202212.00P2
19202112-01-2023444.00P2
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
binuacs
20 - Arcturus

@BobjiK your due date format is in dd-mm-yyyy format and there is no date matching the current date ie 05-12-2023?

BobjiK
8 - Asteroid

Hi @binuacs, currently there aren't any but you are free to add some lines.

binuacs
20 - Arcturus

@BobjiK If I add the date 05/12/2023 and sort in ascending order, this date will be in the last of the list, according to your requirement 2 all the values which come above this date should be marked as P1 and P2 (only for amounts < 500)? I am still not understanding the ask, it would be very helpful if you can add today's date and provide another output

AndrewDMerrill
13 - Pulsar

Not sure exactly what you are looking for either, but figured I'd share this to help further discussion:

Screenshot.png

BobjiK
8 - Asteroid

Hi @AndrewDMerrill 

This WF, more or less solves my problem. However, I am getting a couple of errors while trying to execute it. 

 

As you can see from the screenshot, the Sort Date returns Null and the Invoice Amount DBL returns an error 

 

Formula: tried to apply string operator to numeric value (REPLACECHAR)

The data type for the 2 fields are

 

Invoice Amount Base Currency = Double

Due Date = Date

 

Kindly let me know how to solve this problem.

 

image.png

Qiu
20 - Arcturus
20 - Arcturus

@BobjiK 

You need to replace the period "." as well

Labels