With multifilters you are able to combine and/or logic together with different operators (lequal,equals,is_empty etc).
Original
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
1 | Dett2 | Female | 36 | 16/08/2020 | Great Britain |
2 | Nern | Female | 19 | 15/10/2017 | France |
3 | Kallsie | Male | 20 | 16/08/2016 | France |
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |
5 | Shennice | Male | 22 | 21/05/2016 | France |
6 | Chasse | Female | 23 | 15/10/2018 | France |
7 | Tommye | Male | 24 | 16/08/2017 | United States |
8 | Dorcast | Female | 25 | 21/05/2016 | United States |
9 | Angelee | Male | 26 | 21/05/2017 | Great Britain |
10 | Willoom | Female | 26 | 15/10/2019 | France |
Let’s say that you want to filter out all females that has an age of 19. If you do like this below, you will retrieve rows that has an age of 19 OR has gender Female.
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_col="gender,age" filter_data="Female,19"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
1 | Dett2 | Female | 36 | 16/08/2020 | Great Britain |
2 | Nern | Female | 19 | 15/10/2017 | France |
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |
6 | Chasse | Female | 23 | 15/10/2018 | France |
8 | Dorcast | Female | 25 | 21/05/2016 | United States |
10 | Willoom | Female | 26 | 15/10/2019 | France |
If you only want to see rows where gender is Female and age is 19, you will have define that both age and gender are required (AND). You do this be adding filter_criterias with columns separated with a comma:
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_criterias="gender,age" filter_col="gender,age" filter_data="Female,19"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
2 | Nern | Female | 19 | 15/10/2017 | France |
Let’s say that you want to filter out either females that has an age of 19 OR rows that contains Siuau in the name-column. You can then add an OR to your filter_criterieras:
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_criterias="gender,age OR name" filter_data="Female,19,Siuau" filter_col="gender,age,name"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
2 | Nern | Female | 19 | 15/10/2017 | France |
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |
Above examples applies filters based on that they are equal to column values. This is because the default value of filter_operators is equals. If you want to use different filter_operators for different columns, you define this with the filter_operators attribute.
If you for example would like to filter out all males with an age between 20-25 OR rows that contains Siuau in the name-column. You could do this (equals is the operator for first filter_data(Male), between is the filter_operator the second (20-25) and the third filter operator is equal to Siuau). The filter_criterias defines how AND and OR is used for the filter.
Shortcode
[csvtohtml_create source_type="guess" source_files="free_testdata_10rows.csv" filter_criterias="gender,age OR name" filter_data="Male,20-25,Siuau" filter_operators="equals,between,equals" filter_col="gender,age,name"]
SR. | NAME | GENDER | AGE | DATE | COUNTRY |
---|---|---|---|---|---|
3 | Kallsie | Male | 20 | 16/08/2016 | France |
4 | Siuau | Female | 21 | 21/05/2015 | Great Britain |
5 | Shennice | Male | 22 | 21/05/2016 | France |
7 | Tommye | Male | 24 | 16/08/2017 | United States |