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 a difference row within the data between years and stores

calvinwong
7 - Meteor

Hi,

 

I'm trying to create a difference row within the data between the years and stores. See the following for the sample data.

 

ItemYearStore 1Store 2Store 3
12016100300450
12017200200500
2201640090900
2201790050800
32016200430300
32017500200600

 

Here is the sample result that I would like:

ItemYearStore 1Store 2Store 3
12016100300450
 2017200200500
 Diff100-10050
     
2201640090900
 201790050800
 Diff500-40-100
     
32016200430300
 2017500200600
 Diff300-230300

 

I was thinking I could use multiple cross, do the calculation for diff and transpose it back. Is there another way to do it without creating multiple cross per store?

 

Thank you for your help in advance.

1 REPLY 1
ponraj
13 - Pulsar

Here is the sample workflow for your case.  Hope this is helpful. 

 

WorkflowWorkflowResultsResults

Labels