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.
SOLVED

Grouping Data Multiple Based on Values from Two Columns

Fescobar
8 - Asteroid

Hello Community,

 

I hope that you're all doing well and if you're in the US that you had a wonderful/safe Labor Day Weekend.

 

I am trying to group some data I scraped into groups by Date and Retailer; however, when I use the Summarize tool to group, it only returns the two columns I selected to group by.  

 

I am attaching the sample data as well as the very simple workflow I am attempting to use with the Summarize too.  In addition I am also attaching the results I am seeing with the attached workflow and what I need/expect my results be returned as.

 

As always...THANK YOU!!

 

Fausto

 

 

8 REPLIES 8
AngelosPachis
16 - Nebula

Hi @Fescobar ,

 

Not sire if your expected results screenshot is the one you meant to upload. It seems to me that it's a screenshot of the Pulse_Sample.xlsx file

atcodedog05
22 - Nova
22 - Nova

Hi @Fescobar 

 

Input file and expected output seems to be the same whats the logic?

Fescobar
8 - Asteroid

.@atcodedog05  and .@AngelosPachis

 

Yes, I am sorry.  My expected results would be to have each entry grouped by a number IF the date and retailer match...like in the screenshot.  I have updated the sample file.

atcodedog05
22 - Nova
22 - Nova

Hi @Fescobar 

 

Can you share an expected output.

atcodedog05
22 - Nova
22 - Nova

Hi @Fescobar 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1631113212619.png

 

Hope this helps : )

 

Fescobar
8 - Asteroid

This is solution is so simple that its SEXY!  Thank you!!

 

Thank you .@atcodedog05

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Fescobar 

Cheers and have a nice day!

Fescobar
8 - Asteroid

Hi .@atcodedog05,

 

I hope that you're doing well.

 

The requirement on the solution you provided changed a bit.  I have been trying to make changes to the Multi Row formula on my own, but nothing I am doing is proving the results I need.

 

The question is, what would be the expression if I wanted to group and create a Pulse Promo for three different fields.

For example  I am replacing the expression you provided 

 

IF [Retailer / Website]!=[Row-1:Retailer / Website]
THEN [Row-1:Pulse Group]+1 ELSE [Row-1:Pulse Group] ENDIF

 

To

 

IF [Channel] and [Retailer / Website] and [Date]!=[Row-1:Channel]
THEN [Row-1:Pulse Group]+1 ELSE [Row-1:Pulse Group] ENDIF  (This did not return anything)

 

I also tried 

 

IF [Brand Family]!=[Row-1:Brand Family]
THEN [Row-1:Pulse Group]+1 ELSE [Row-1:Pulse Group] ENDIF (This returned the result below)

 

I tried these and others in hopes that it will create a "pulse group" when Date, Retailer, and Channel are the same.  If there's a change, then a new "pulse group" is created.

Pulse GroupDate[Retailer / WebsiteSpirits CategoryChannelBrand Family
12021-05-01 13:00:00TotalWine&MoreAmerican WhiskeyTwitterMAKER'S MARK
12021-05-01 14:00:00TotalWine&MoreAmerican WhiskeyFacebookJIM BEAM BRBN
22021-05-01 14:02:20DrizlyMezcal & TequilaInstagramPATRON
32021-05-01 14:19:41TotalWine&MoreAmerican WhiskeyInstagramN/A
32021-05-01 14:24:51TotalWine&MoreAmerican WhiskeyInstagramN/A
32021-05-01 15:00:00BevMo!Mezcal & TequilaTwitterN/A
32021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaTwitterN/A
32021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaTwitterN/A
32021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaFacebookN/A

 

What I was expecting to see in all of my attempts was this.

Pulse GroupDate[Retailer / WebsiteSpirits CategoryChannelBrand Family
12021-05-01 13:00:00TotalWine&MoreAmerican WhiskeyTwitterMAKER'S MARK
22021-05-01 14:00:00TotalWine&MoreAmerican WhiskeyFacebookJIM BEAM BRBN
32021-05-01 14:02:20DrizlyMezcal & TequilaInstagramPATRON
42021-05-01 14:19:41TotalWine&MoreAmerican WhiskeyInstagramN/A
52021-05-01 14:24:51TotalWine&MoreAmerican WhiskeyInstagramN/A
62021-05-01 15:00:00BevMo!Mezcal & TequilaTwitterN/A
72021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaTwitterN/A
72021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaTwitterN/A
72021-05-01 15:00:00Spec'sWinesSpiritsandFinerFoodsMezcal & TequilaFacebookN/A

 

What would I need to change the expression to in order to achieve this?  Is this even possible with the Multi Row Formula?

 

Thank you for your assistance in advance!

 

Fausto

Labels