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!
Solved! Go to Solution.
Hi @flora- - Can you please post a sample data set and your workflow?
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:
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.
Hope this can help give you some clarity!
@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!
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.
Let me know if this helped!
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...
Thanks @JoaoLeiteV and @apathetichell ! 🙂 both worked!