We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

If Condition Formula Help

MarcusHankinsOptum
6 - Meteoroid

Hello,

 

I have an interesting formula I am trying to work on to set something up for a filter. I am trying to produce a report where my input pulls in data from multiple previous months and i am only wanting to have an output including previous month. This is going to be an automated continuous report produced every month so i cant just filter for a designated number or date range. So this is what i was trying to set up.

 

IF [Field1] = (DateTimeFormat(DateTimeAdd(DateTimeNow(),-1,"Month"),"%m")) THEN "True" ELSE "False" ENDIF

 

Field one being the Month that the data comes from and then doing a date time Add and Format statement that ends up equaling the month Previous month to set up a True or False that i can then just filter for True. 

 

The error im getting is ( The field "" is not contained in the record)

4 REPLIES 4
AbhilashR
15 - Aurora
15 - Aurora

Hi @MarcusHankinsOptum, could you provide us some sample data (or a dummy set) for us to get a feel for what your data looks like?  

MarcusHankinsOptum
6 - Meteoroid

I was assisting with an issue a team mate was having and I created essentially a text output of what the problem issue was to see if I can get a new field added.

 

I attached a snapshot of what my workflow looks like. Essentially there is a month and a year Column. When the actual input from a data source happens it pulls in month of Data, and Year of data and displays as follows

 

month of Data( June = 06, July = 7)

 

So im trying to essentially create a DateTimeAdd + a DateTimeFormat formula into an If statement so that essentially 7=7 then True else false but because this is going to be a report run every month I cant just say 7=7 because when it becomes August it still only filter or find the 7=7 when I need it to look for 8=8. if that makes any sense.

AbhilashR
15 - Aurora
15 - Aurora

You are missing a column name which might be the issue in your case.

AbhilashR_0-1596736694005.png

 

FláviaB
Alteryx Community Team
Alteryx Community Team

Hi @MarcusHankinsOptum.

 

I moving your post to the Designer Discussions Board for more visibility. 😉 

 

Flávia Brancato
Labels
Top Solution Authors