Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Change year in column to following year if date before FY beginning

zachritter00
7 - Meteor

Hello-

 

I have a workflow creating a data set for a PBI dashboard; the inputs contain monthly data for this FY and the previous one.  I have used the formula tool to duplicate the "Month" column to "Bus Month," and now I would like to change every cell that has a date prior to 3/1/2023 to +1 year so that I have the prior year data but my filters are only picking up the current FY in PBI slicers.

Dates.PNG

 

Here is where I'm at, I'm getting a "Malformed IF statement error"

 

IF([Bus Month] < "2024-3-1" then DateTimeAdd([Bus Month],+12,'month')

2 REPLIES 2
binuacs
21 - Polaris

@zachritter00 What is your date format? Can you provide a sample file and expected result?

zachritter00
7 - Meteor

The data comes out of SAP in a format like this - =@ EPMOlapMemberO("[TIME].[PARENTH1].[2023.APR]","","Apr-23","","000")

 

It looks like Alteryx brings them all in as doubles.  Further in the workflow, I use a DateTime with "String to Date/Time format," incoming string custom", format MMM-yy

 

I don't touch them again except for a sort later on

 

 

Labels
Top Solution Authors