I have to extract a data set based on multiple variables.
In this example, I need to create 7 different datasets.
Apply filters to Column1 and Column2 in pack one and applies filters to Column1 Column2 and Column3 for pack 2 etc. Data will then be extracted from Table1. Any suggestions?
if(not isempty({Param1}), [Column1]={Param1}, true())
and if(not isempty({Param2}), [Column2]={Param2}, true())
and if(not isempty({Param3}), [Column3]={Param3}, true())
and if(not isempty({Param4}), [Column4]={Param4}, true())
The true() part is needed because the filtering is done using the logical AND operator between several conditions.
Alternatively, you can pass Table1 into the iterated project with the help of the “Iterate table” action instead of using a dataset file, but that’s more advanced technique.
sorry, I won’t be able to make the entire solution for you. However, you can use the example below to filter by multiple columns and produce various subsets from the same dataset (which was your original question):
This example takes 3 sets of parameters and produces 3 datasets (packs) appended into one table. Datasets can be distinguished by [Dataset ID]. The main project is filter-params.morph which iterates filter.morph. For simplicity, the 3 sets of filters are produced from the main dataset using a sequence of actions.