Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

How to mimic Excel PRODUCT Function (multiply multiple rows within a group)

Highlighted
5 - Atom

Good day,

 

New user of Alteryx and first post to this forum. Just setting expectations

 

I am looking to group together rows by the KeyID column (first column in the attached data sampling) and multiply each value from the value column (last column in the attached data sampling). Similar to the Excel PRODUCT Function. 

 

EXCEL REFRESHER : The PRODUCT function is helpful when multiplying many cells together. The formula =PRODUCT(A1:A3) is the same as =A1*A2*A3.

 

Any assistance is greatly appreciated.

 

 

MultiplyRows.PNG

Alteryx Certified Partner

Hey @ttulloch 

 

There should really be an option for this in the summarize tool, right? But since there isn't, here's one way to do it,

 

Screenshot (8).png

 

Use a multi-row formula to create [Product] field - multiply the previous [Product] by the current [Value] to get a running product (make sure you tick to groupby your [KeyID] field.

Then use a summarize to groupby [KeyID] and take the last [Product]. 

 

Example attached...

Highlighted
Alteryx
Alteryx

I see im a little late to the party but going off response below, here is a build out of another potential solution: 

 

 

Highlighted
5 - Atom

Worked like a charm  ... Much thanks [insert thumbs up emoji here] ...

Labels