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

Excel Report: Problem with headers

neromerob
10 - Fireball

Greetings

I´m here with a problem regarding the headers and information of my report.

First, the report is about information that is produce monthly and each month we need the data of all the months that exist before, considering that month 1 would be March 2021.

I used a dynamic tool to change the name of the month to year and month.

But some problems begin to appear if I increase the numbers of columns. 

 

columnas.jpg

 

I really don’t know what this is happening and if I continuing adding columns eventually would affect not only the headers but the Data itself (for example that instead of giving the full name “Nelson” would show part of it “Nelso”)

 

Thank you in advance

6 REPLIES 6
RCurry1230
7 - Meteor

Could you show the set up of the dynamic rename? And it it possible for the "Nelson" example your data field is not long enough? 

neromerob
10 - Fireball

hello, still trying to find a good solution 

DataNath
17 - Castor

How does this look @neromerob? Workbook and code below:

 

if REGEX_Match([_CurrentField_], '[a-z]+_\d{4}_0\d') then
replace(REGEX_Replace([_CurrentField_], '[a-z]+_(\d{4}_0\d+)', '$1'), '_0', '_') else
REGEX_Replace([_CurrentField_], '[a-z]+_(\d{4}_[1-9])', '$1') endif

 

DataNath_0-1652902244958.png

 

In terms of data within the columns being trimmed, this won't be due to the dynamic rename tool as that only deals with headers. Check the field/data size as suggested above!

neromerob
10 - Fireball

I tried that solution, still have the same problem

binuacs
20 - Arcturus

@neromerob un check the Dynamic or Unknown fields from the dynamic rename tool and try with your old formula. If that doesnt work try to remove the data cleanisng tool and try again with the same setup in the dynamic rename tool mentioned below

 

binuacs_0-1652905902937.png

 

 

Replace(Replace([_CurrentField_],'CountWithNulls_',''),'_0','_')

 

binuacs
20 - Arcturus

@neromerob Another option you can try with check the field names  StartsWith([_CurrentField_],'CountWithNulls') then only update those headers and others leave like that. attaching a sample workflow

 

IIF(StartsWith([_CurrentField_],'CountWithNulls'),Replace(Replace([_CurrentField_],'CountWithNulls_',''),'_0','_'),[_CurrentField_])

 

binuacs_0-1652906689974.png

 

Labels