So I am tasked with creating subsets for my data. We have a couple hundred columns. So it is basically Create subset "Hypertension" is variable Clinic01 == 1 but there are many different subsets I have to create. In my head, I imagine that I can get there by creating a bunch of Filter Tools, but I have about a hundred subsets to create, so i was wondering if there exist a faster and more efficent way to create subsets. I have lookedbut have been unable to find them. Thank you.
Solved! Go to Solution.
I am not quite following you good sir.
For one section, my "WholeClean" file I have :
Thank you, I appreciate it.
Happy to have a go @MarqueeCrew,
Could you send a sampe set of data to work with (by all means DM if you need to)?
Ok so here is a first go.
I take the data and transpose it so looks like:
Filter this where the value is 1. I am working with a numeric field but this can be changed to cope as needed.
After that I join to a table mapping clinic to subset name
This gives a set of subsets each case belongs to
Next join back to the original data to add a subset field and duplicate the rows for those cases in multiple subsets
Finally as @MarqueeCrew mentioned use an Output tool to save to a set of files append the subset name to the file name to create a set of files one for each subset
Sample attached with some fake data. Will Write to C:\Temp when run
That looks good. I am going to try all f my data like that and see how it works out. Thank you so much. Im still a little unclear with the output thing, but I will try and figure it out.
The output tool has a config section that controls saving to different files:
Very useful feature.