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

Assign priority and week ending date based on row number

Sandy05
6 - Meteoroid

Hello Team,

 

I am new to Alteryx and need help on following.

I have first 2 existing coloumns samid and status. Now based on status value (only if forecast) i want to assign priority 1 to first 5 records, 2 to next 5 records.

Then assign Friday week ending date to priority 1 and next Friday to priority 2.

 

test.PNG

 

Thanks in advance

4 REPLIES 4
alex
11 - Bolide

This workflow is based on entering the first week ending date assuming it is not available in your data.  Let me know if this provides the solution you are looking for.

SAMID1.JPGSAMID.JPGSAMID2.JPG

Bob_Blackey
11 - Bolide

Hi Sandy,

 

Fun challenge - thanks! While it seems really simple it does involve a bunch of tools. The key is the Multi-Row Formula tool - you want to get familiar with that one, very helpful!

 

The workflow first uses a filter to separate the Forecast records. 

 

It uses a Multirow formula to create a RowCount column - If the previous row's RowCount is 5 then start at 1 again else add 1 to the previous row (notice the option to set values for rows that don't exist to 0)

 

it uses another Multirow formula tool to calc the Priority - again if the previous row's RowCount = 5 then add one to the previous row's Priority else keep it the same.

 

Then append Friday's date to each record (this is in a Text Input tool for now)

 

Add of seven days times the Priority code -1 to change the week end date

 

Union the records together and then drop the RowCount column

 

Week_end_priority.png

 

Cheers,
Bob

 

 

Sandy05
6 - Meteoroid

Thanks Bob

Sandy05
6 - Meteoroid

Thanks for the reply Alex. Unfortunately i am using version 10.6 so couldn't open your workflow.

Labels