This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I want to get the output something like this. The output is based on Master Number. E.g If Master number if 101 then everything which has 101 in master number, they all will be in one file, for which we have 105 then everything will be in a separate file and so on. For each name, we are creating a column.
You can then configure an Output tool to use this new field to write each record to the appropriate file.The difficult part is writing these files with different fields. For this reason, I recommend using a batch macro to write each file.
Check out the attached workflow+macro that shows how this can be done.
@Twinkle95M - This is a great use case for a Batch Macro! In the attached solution, the summarize tool will create a list of the unique Master Numbers in the data set, and the Batch Macro will filter for each independently, create the cross tab table structure, update the file path a write out an individual output file with only those data points and fields. Upon completion of the first iteration, the macro will proceed to the next item, and so on, until the list is complete.
Give this a go and let me know if it works, please.
At first, seemed like a simple solution that the Output tool could handle, because of its ability to separate the data into different sheets/tables (Excel, Access) or different files (any file type) based on a field.
But, the columns in your example need to be dynamic too.
A batch macro can feed each unique Master number into the main macro, which filters the data based on that master number. A transpose/formula/summarize finds which columns are empty, and a filter eliminates those from the result. Then, join back to the original data, transpose, and output within the macro. I have the macro outputting to my temp directory.
This isn't an exact match to your output, so you'll have to tweak it a touch.