Alteryx Designer Desktop Discussions

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

In-DB tools - how to only select records where particular column is not null YTD

JacobLuke
6 - Meteoroid

Hopefully someone can help me figure this out. Apologies if I'm posting this in the wrong forum. 

I can't get too detailed because I'm developing a table with very sensitive data, but I need to find a way to select only the records where a certain string field is non-null over the whole year/YTD and an indicator variable is = 1 over the whole year/YTD. I need to use the in-db tools as I'm pulling large amounts of data all at once. Any help or ideas is much appreciated!

6 REPLIES 6
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Hey @JacobLuke   you should be able to use a Connect IN-DB tool and write that into your query, just as you would do with a regular Data Input tool.

Is that not working for you?  If so, can you describe what you've tried?

JacobLuke
6 - Meteoroid

@Patrick 

 

I need records where the field is null as well since I'm creating monthly percentages. Sorry, should have made that clear in my original post. 

patrick_mcauliffe
14 - Magnetar
14 - Magnetar

So you need both null and non-null results?

Obviously, I don't want to see the data associated with this, but can mock up what your data looks like (with dummy data on a spreadsheet) and what you want the output to look like?

JacobLuke
6 - Meteoroid

Yes! I need both null and non-null. I'll try getting a mockup posted as soon as I'm able. Thank you for the reply! @patrick_mcauliffe  

phottovy
13 - Pulsar
13 - Pulsar

Hi @JacobLuke ,

 

Edited to include month calculations:

 

If I'm understanding your question correctly, you should be able to accomplish this using a handful of tools .

  1. First use the filter tool to include only the year you want to calculate. 
  2. Use a formula tool to calculate the month 
  3. You can then use a summarize tool to get the total Count, Count Null, and Count Non Null for your string field phottovy_1-1629843336677.png

     

  4. Calculate the null percentage with another formula tool 

 

Sample workflow:

phottovy_3-1629843410022.png

 

JacobLuke
6 - Meteoroid

@phottovy Thanks a ton! I'll try this sometime this week and get back to you! Appreciate the help guys!

 

Labels