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

Union for DataSet1 and "Data Not Available"

flora-
5 - Atom

Hi,

 

I am trying to make Alteryx union two data sets, however, one of them has no data available and results in no output. Is there a way to union both data set if both datasets are available, or retain the data set that has something in it?

 

Thanks!

6 REPLIES 6
ArtApa
Alteryx
Alteryx

Hi @flora- - Can you please post a sample data set and your workflow? 

JoaoLeiteV
10 - Fireball

Are you using the Union tool to join your data? If so, it should output both datasets, even if one's empty. 

 

Check out the Union Tool documentation to see the available options.

 

Inside Alteryx Designer, you can also right-click the Tool in the Tools Bar and select Open Example:

JoaoLeiteV_0-1625754875303.png

 

Now if you're using a Join tool and for some reason want to get all the outputs, just add a Union tool at the exits.

JoaoLeiteV_1-1625755027642.png

 

Hope this can help give you some clarity!

flora-
5 - Atom

@JoaoLeiteV @ArtApa I ran the example shown, but it's specifically in case the 2nd dataset is empty (see attached). Is there any other way around this? Thanks!

JoaoLeiteV
10 - Fireball

Thanks for adding your dataset.

 

By checking your workflow, the error was in the Filter tool. You're trying to filter the Region and, because the file is empty, Alteryx is automatically formating it to Double.

 

To fix this, add a Select tool after your input and make sure that any filtered columns are a String type, in this case, I used V_String.

 

JoaoLeiteV_0-1625774249495.png

 

Let me know if this helped!

 

apathetichell
18 - Pollux

As an alternative to @JoaoLeiteV's solution you can just change your filter so that it says:

tostring([Region])="Central" 

 

in the custom part of your filter... this converts whatever is there (which in your case is null() formatted in a double column) into a string and checks to see if it has "Central" in it...

flora-
5 - Atom

Thanks @JoaoLeiteV and @apathetichell ! 🙂 both worked! 

Labels