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

Formula returning [null]

jmpark
6 - Meteoroid

Hi all!

 

I was just wondering why one of my formulas (30), specifically expression #11, is returning only [Null]. 

This happens even when I put the most basic formula in, such as [Task On]. 

I have posted my workflow below.

Thank you in advance!

 

10 REPLIES 10
tcroberts
12 - Quasar

Have you tried changing the type of the field? I notice that its a V_String, and I'm not sure if this would apply here, but I've had some weird conversion errors result in NULL values in cases where the type of the new field doesn't play well (match, or easily coerce types) with the one I'm calling using the expression.

 

Since you haven't obtained any sample data to work with, I'm unable to try and work out a solution. If you could upload a sample dataset I could try and diagnose this more.

 

Cheers!

jmpark
6 - Meteoroid

Hi tcroberts!

 

Thank you for the response.

As you suggested, I've attached a sample dataset below.

Thank you again for the help and please message me if you need any extra info.

 

 

kgalbert
9 - Comet

Hi jmpark,

 

So I think the issue is data types, but it could be that inputting the data from a spreadsheet caused errors in my testing.

 

Either way, I used the toString formula on some dates and removed quotes from some numbers and the workflow ran without error and didn't produce NULLs in the Status field formula in tool #30.

 

Let me know if this solves your problem.

jmpark
6 - Meteoroid

Hi kgalbert,

 

thank you for your response. It seems that I made a mistake in the initial post;

I meant to say that I'm getting [null] on the field mnth expected.

When I tried using the work flow you posted, it started returning some "N/A" values, but still are not returning

the values I want (either [Task On] or [Reqs Date]). 

I apologize for the confusion and thank you again for the help!

 

kgalbert
9 - Comet

Hi jmpark,

 

It seems to be working with the example data in the workflow I posted.  

 

I attached a screenshot.  Can you post what you get when you run the workflow?

 

Thanks,
Ken

jmpark
6 - Meteoroid

Huh, that's really odd.

Attached below is my screenshot:

image.pngimage.png

kgalbert
9 - Comet

Are there any errors or warnings for the formula tool?

jmpark
6 - Meteoroid

Yes, I've attached the screenshot of the errors below.

image.png

kgalbert
9 - Comet

So the issue is definitely data types.

 

Here's a quick interactive lesson about data types from Alteryx that might help if you're not sure what these things are:

 

https://community.alteryx.com/t5/Interactive-Lessons/Understanding-Data-Types/ta-p/73958  (If the link doesn't work, mouse over 'Academy' on the left hand side, then click Interactive Lessons.

 

If you already are familiar, then I would look at Select (11) and see what the data types are for [Task On] and [Reqs Date].  On my screen [Task On] is a date and [Reqs date] is a Double.  I would use a DateTime tool from the Parse menu to change [Reqs Date] to a date and then change the formulas in Formula (30) to account for this change.  

 

Basically Alteryx is being asked to run formulas designed for dates on fields that it isn't sure are dates.  Once the conversion error limit is reached it stops trying and returns Nulls.

 

Thanks,
Ken

Labels