Alteryx Designer Desktop Discussions

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

Adding a Record Count Column to Reflect Value of 1 per each Row

RifferX
8 - Asteroid

Just what the subject says -- I want to add a new column (GroupRowCount) that will reflect one record per row that can later be used to aggregate with by using the Summarize tool. I can't believe all my searches haven't gotten me the answer yet as I thought it would be fairly straight forward and simple (it probably is since I'm a newb). I figure it should be done using the Formula tool but not sure how to go about it. 

 

I have a column called ckey that is an Int32 size 4. These are pharmacies with dispensing data I am pulling out of Hadoop to do some aggregations and then write back into Hadoop. First time using Hadoop but also fairly new to Alteryx. My thought is the ckey column would be what I could use to create the new column showing a value of 1 for each ckey on each line (not each distinct ckey). Later, I could use that value when aggregating my other fields.

 

I have attached a screenshot of the fields to be aggregated as well as the workflow I am currently building. Any advice is appreciated.

 

 

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

I think that the formula that you're looking for is:

 

1

The column will have a constant value of 1 for every record.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
RifferX
8 - Asteroid

Thanks

 

You wouldn't believe how long I messed around with this. 

Labels