Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Period on Period movement analysis and Comments

Krishn
5 - Atom

Hi,

 

I was using pivots for period on period analysis and then provide comments using some basic formulae.

 

Is it possible to do same using Alteryx, with minimal no manual intervention.

 

Period 1 Data

DateNameProductSales in kgProfit in GBPCountryIS LLC
31-Mar-19ABCSteel500115INN
31-Mar-19ABCIron200220USN
31-Mar-19CABSteel600204UKY
31-Mar-19CABPoP10050UKY

 

 

Period 2 data

 

DateNameProductSales in kgProfit in GBPCountryIS LLC
31-Mar-20ABCSteel400220INN
31-Mar-20ABCIron300207USN
31-Mar-20CABSteel50045UKY
31-Mar-20CABPoP350190UKY
31-Mar-20dcbgold200210AU

Y

 

 

by combining both tables I used to prepare Pivot and the comments using & functions.

    

Is LLCNameCountryProduct2019 - Sales2020 - Sales2019- Profit2020 - ProfitSales DiffProfit DiffComment SalesComment profit
NABCINSteel500400115220-100105Movement in Sales for ABC operating in IN is -100 GBPMovement in Sales for ABC operating in IN is 105 GBP
NABCUSIron200300220207100-13Movement in Sales for ABC operating in US is 100 GBPMovement in Sales for ABC operating in US is -13 GBP
YCABUKPoP10035050190250140Movement in Sales for CAB operating in UK is 250 GBPMovement in Sales for CAB operating in UK is 140 GBP
YCABUKSteel60050020445-100-159Movement in Sales for CAB operating in UK is -100 GBPMovement in Sales for CAB operating in UK is -159 GBP
YDCBAUGold 200 210200210Movement in Sales for dcb operating in AU is 200 GBPMovement in Sales for dcb operating in AU is 210 GBP
Grand Total   14001750589872    

 

Can some one help me in creating same using Alteryx?

2 REPLIES 2
Assaf_m
11 - Bolide

yes, this is doable,

 

please check the attached workflow solution and let me know if it works for you

 

Assaf_m_0-1616487848864.png

 

Assaf_m_1-1616487917408.png

 

Krishn
5 - Atom

Thanks Assaf_m, It was helpful.

 

I was trying to use combination of V_Wstring,Double and Fixed decimal in Comment section.

 

For eg.

 

Sample data:

Country: US (V-Wstring)

Profit: 0.02 bn GBP (Fixed Decimal)

Sales: 100bn (Double)

 

Expected result: Sales in US is 100bn and profit is 0.02bn GBP.

 

I have tried this expression: "Sales in" + [Country] + "is" + [Sales] + "bn" + "and" + "Profit is" + [Profit] + "bn GBP".

 

But I was getting following error:  "Parse error at Char: type mismatch in operator +."

 

Thanks in advance.

 

 

Labels