Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.

Alteryx Designer Discussions

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

Passing Previous month value to a new column

kiotsuresh
7 - Meteor

I have the Data like below,

 

DateSalesProfit
05/01/2022100300
04/01/2022200400

 

Date is is (MM/DD/YYY-Format).

 

I need the below Output:

DateSalesSalesPM(Prev month)ProfitProfitPM(Prev month)
05/01/2022100400(April month sales)

300

400 (April month Pft)
04/01/2022200      (March month Sales)400        (March month Pft)

 

Can somebody help me in achieving this?

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @kiotsuresh 

 

Welcome to the community. Please use the tags sparingly to get to the answer you are looking for faster. You will probably need to have a look at the multi-row formula tool. That will help you populate the profit and sales for a certain month from the row below (i.e. from the previous month).

 

Hope that helps,

Angelos

Emmanuel_G
13 - Pulsar

Hi @kiotsuresh ,

 

Hope you're fine.

 

Please find a test below with exact desired output.

 

Let us know if it works the way you want.

 

Cheers !

 

Emmanuel_G_0-1657416517580.png

 

TonyaS
Alteryx
Alteryx

@kiotsuresh 

I see the AMP Engine tag used, but I do not see anything stating that this issue was specific to AMP Engine. Does anyone know if this was AMP specific? There are a lot of tags used on this post, but I try to follow anything with the AMP Engine tag. 

Tonya Smith
Sr. Technical Product Manager, Alteryx Engines
kiotsuresh
7 - Meteor

Instead the Data template I posted above consider the data template below, the solution required is same.

 

Date in MM/DD/YYYY format

 

DateDatasourceCategory GroupCategory typecategory SegmentCategory type lvl1category type lvl2category type lvl3manu Year classificationProfitProfit PM(new column)SalesSalesPM(New Column)RevenueRevenue PM(New Column)
1/1/2020SQLFurnitureTableAmazonJoinType 1Type AYear 2015100December 2019 profit100December 2019 Sales100December 2019 Revenue
1/1/2020SQLFurnitureChairWallmartJoinType 1Type AYear 2015200December 2019 profit200December 2019 Sales200December 2019 Revenue
1/1/2020SQLFurnitureBookcaseEbayJoinType 1Type AYear 2015300December 2019 profit300December 2019 Sales300December 2019 Revenue
1/1/2020SQLFurnitureDiningFlipkartJoinType 1Type AYear 2015400December 2019 profit400December 2019 Sales400December 2019 Revenue
2/1/2020SQLFurnitureTableAmazonUnionType 2Type CYear 2016500100500100500100
2/1/2020SQLFurnitureChairWallmartUnionType 2Type CYear 2016600200600200600200
2/1/2020SQLFurnitureBookcaseEbayUnionType 2Type CYear 2016700300700300700300
2/1/2020SQLFurnitureDiningFlipkartUnionType 2Type CYear 2016800400800400800400
3/1/2020SQLFurnitureTableAmazonBlendType 3Type DYear 2017900500900500900500
3/1/2020SQLFurnitureChairWallmartBlendType 3Type DYear 2017100060010006001000600
3/1/2020SQLFurnitureBookcaseEbayBlendType 3Type DYear 2017110070011007001100700
3/1/2020SQLFurnitureDiningFlipkartBlendType 3Type DYear 2017120080012008001200800
Labels