Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

create new month year label for every n records

btwood
6 - Meteoroid

Hi All, I'm trying to create a new month year in a new field for every n rows/records.  I don't know if it requires the count function or something else.  I'm trying to do this for every 1,349 rows/records starting with March 2022 and for every month thereafter for 2022.  Any ideas?  Thanks

10 REPLIES 10
dougperez
12 - Quasar

Hello @btwood can you provide a sample dataset? I didn't understand your problem

Qiu
21 - Polaris
21 - Polaris

@btwood 
If I understand your intention correctly.
And I used 2 rather than every 1349 rows just for example.

0315-btwood-01.PNG0315-btwood-02.PNG

btwood
6 - Meteoroid

Hi Doug,  I've attached a 'test' file.  The first tab in Excel is the test data with Company_Name and Random fields and I'm looking to add the blue indicated New_Count_Field and Month_Year fields on that tab.  The 2nd tab shows some partially solved data in the new fields as example.  I'm trying to add a count of 1,349 in the New_Count_Field (from 1 to 1,349 rows) and label the group a new month each time.  Hope this helps?

dougperez
12 - Quasar

Hello!

 

See the workflow attached

dougperez
12 - Quasar

I was interested by the @Qiu answer and applicatted to your data, see that the @Qiu solution is automated!

btwood
6 - Meteoroid

Thank you Doug and Qui!  Both are great solutions.  I ended up using Qui's solution as this will carry over to next year without a 10 or 12 in number of months requirement in 'Tile'.

btwood
6 - Meteoroid

@Qui - How do I make the SurveyGroup starting at 1 vs. 0 when I make the FLOOR equal to 1,349 (vs. 2)?  Thanks

btwood_0-1647348669765.png

 

dougperez
12 - Quasar

Download "my version" of the @Qiu solution, this do what you want

I put 1350 on it to "respect" the lines

Qiu
21 - Polaris
21 - Polaris

@btwood 
maybe just add 1 at the end of the line? 😊

If you find hte solution from me and @dougperez  are helpful, we would appreciate that you mark them as acceptable.
In this way, other person can also find it helpful.

 

Labels