Alteryx Designer Desktop Discussions

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

Create output file name with Date Range

Jaganmohan
8 - Asteroid

Hi Team,

 

For user flexibility added custom filter by using interface tools but at the same time i need the output file name with that date Range.

Example : if user opt between 03/01/2023 to 03/30/2023 then output file name should be Report 03012023-03302023.xlsx 
Filename+Date range.xlsx

Please try to help me out on this, thanks in advance.

Jaganmohan_0-1682099443660.png

 

6 REPLIES 6
VijayAnaparthi
8 - Asteroid

After interface tool output you will get Start Data and End data column values because user will select start and end dates. Then you can use simply formula tool where you can create new column = Filename + Tostring(StartDate)+Tostring(EndDate). 

Then pass this new column as filed in output tool and put configuration in output tool as change file/table name.

Jaganmohan
8 - Asteroid

Thanks for the quick response.
No - for me designer not creating start date and end date fields by default (Using 2019 version).

if possible - could u please provide me the workflow with simple example related to this. 

Jaganmohan_0-1682100791219.png

 

Yoshiro_Fujimori
15 - Aurora

Hi @Jaganmohan ,

How about this?

 

Workflow

Yoshiro_Fujimori_0-1682124538639.png

 

Formula to prepare File Name

From = "2023-04-10"

To = "2023-04-20"

FileName = ".\Report"
+ DateTimeFormat([From],"%m%d%Y") + "-"
+ DateTimeFormat([To],"%m%d%Y") + ".xlsx|||sheet1"

 

"From" and "To" are updated with user input.

 

Output Data Tool configuration

Yoshiro_Fujimori_1-1682124768719.png

 

Jaganmohan
8 - Asteroid

Hi @Yoshiro_Fujimori 

Thanks for your Solution.

But, as per my requirement i need to create different sheets in one excel file.

Your example giving me the only one sheet criteria with File name. Could you help me on how to create different sheets with the same logic.
My existing workflow creating the multiple sheets based on other Field criteria.
Note : Need to create Multiple sheets and file name with Date range - Thanks In advance


Jaganmohan_0-1682342823390.png

 

Yoshiro_Fujimori
15 - Aurora

Hi @Jaganmohan ,

 

You original requirement is

if user opt between 03/01/2023 to 03/30/2023 then output file name should be Report 03012023-03302023.xlsx 

So the date range is in the file name.

Then, your new requirement is

i need to create different sheets in one excel file.

Now I am not sure what data you want to include in each sheet in the file.

 

In any case, your requirement should be achieved with the below tweaks.

Formula tool to generate the file name / sheet name you want, and 

Output Data tool to adjust "Output Options" and "Take File/Field Name from Field".

Good luck.

Jaganmohan
8 - Asteroid

Hi,

Agreed - but , required two solutions in one file.

For example : I am attaching input and required output file for your reference.

Requirement 1: User need to extract the data by using Interface tool (Date Range Filters ) - in my example i.e : 04012023 to 04252023.

Requirement 2: The same Date range need to be present in the Output file name. Example: Output Report 04012023-04252023.xls
Requirement3: and the tool need to generate different tabs (Green,red,yellow)  based on description column  in the given  input file along with Summary tab .
and all output sheets need to be overwrite on each run.

Jaganmohan_0-1682648474544.png

 

I am attaching input and output files for your reference. 
Note : I am using 2021.4 version to built the workflow - Thanks in advance.

Labels