CSV to html – Multi filters

With multifilters you are able to combine and/or logic together with different operators (lequal,equals,is_empty etc).

Original

SR.NAMEGENDERAGEDATE COUNTRY
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
6ChasseFemale2315/10/2018France
7TommyeMale2416/08/2017United States
8DorcastFemale2521/05/2016United States
9AngeleeMale2621/05/2017Great Britain
10WilloomFemale2615/10/2019France

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.NAMEGENDERAGEDATE COUNTRY
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
4SiuauFemale2121/05/2015Great Britain
6ChasseFemale2315/10/2018France
8DorcastFemale2521/05/2016United States
10WilloomFemale2615/10/2019France

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.NAMEGENDERAGEDATE COUNTRY
2Nern Female1915/10/2017France

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.NAMEGENDERAGEDATE COUNTRY
2Nern Female1915/10/2017France
4SiuauFemale2121/05/2015Great 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.NAMEGENDERAGEDATE COUNTRY
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
7TommyeMale2416/08/2017United States