Alteryx Designer Discussions

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

Traverse through each row to calculate change

amadra
8 - Asteroid

Hello,

The Challenge -> For each product, I'd like to flag if there was a change to the 'amount' over the months.

I could use a multi-row formula to see if the balance changed month over month for 12 months but sometimes I only have data for 4 months.

I have attached the input and desired output in this post.
Sample_data.JPG desired_output.JPG

 

 

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @amadra ,

 

What I would do is look if for each product you have more than one values appearing - you can do it with a summarize tool, group by product and count the distinct amounts that appear.

 

Then if that count is greater than 1, that means there was a change.

AngelosPachis_0-1653687957707.png

Hope that  helps,

Angelos

rfoster7
9 - Comet

 You don't even need a multi row tool Just do a Summarize tool, group by Product and get Min(Amount) and Max(amount). then use a formula tool to make a status of "No Change" if the min = max and "Change" if it isn't. 

 

rfoster7_0-1653688301387.png

 

 

 

 

If you need something more complicated like, is the change positive, or how many changes or longest time between changes, then you need the multi row tool. 

 

phottovy
12 - Quasar

Hi @amadra , the multi-row tool was my first instinct and I think you could use it to get your intended result. Instead though, I used a summarize tool to find the min and max for each product. If the min equals the max, then there was no change. I attached my version of the workflow.

phottovy_0-1653688257053.png

 

amadra
8 - Asteroid

Hi @AngelosPachis , @rfoster7 , @phottovy  - thank you for the quick turnaround. Didn't realize this could be solved in so many different ways 😊

Labels