Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Issue in creating dynamic summary table where field name should change every month

YashikaVaish
6 - Meteoroid

Hi Everyone , 

 

I am new to Alteryx and got my first project of creating summary ( Pivot table) attached the screenshot. I have a column "Posted Month" which consists different months like current month , current -1 , current -2. I need to create pivot where these values have to come in  fields. The challenge is to make these field name dynamic , currently join tool,sort tool and table tool hard code the column name value to June , July and August but when next month Input file will update and July , August and September month data will come then It will give error and incorrect result.

 

I want to make changes in workflow like that  it will every time create summary table for the months available in data instead of fixing the name of the month . I am attaching screenshot of workflow I created and output I want.

I would appreciate if anyone could help me with that. Many Thanks in advance.

 

Thanks & Regards,

Yashika

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@YashikaVaish 
It would be better you could provide a sample intpu and desired output, not picture.

messi007
15 - Aurora
15 - Aurora

@YashikaVaish,

 

I think you have to use a geniric column like M-3, M-2 and M-1

 

1- M-1

IF DateTimeDiff([End date], [Start Date],"Month")=1
then [Value]
else 0
endif

 

2-M-2

if DateTimeDiff([End date], [Start Date],"Month")=2
then [Value]
else 0
endif

 

After that you do your transpose on those column instead of the Aug, July which are note stable because they will change next run.

 

After that you can rename M-3, M-2, M-1 with the month in question (Have to think about renaming dynamically the column).

 

hope that Help!

 

Regards, 

Labels