TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how do I use csvsimple (or what else? pgfplotstable?) with more than 1 condition as filter (i need about 7) to show a filtered csv-file as table? I tried things like:

filter=\equal{\gender}{m} and \equal{\grade}{5.0}

but that does not work. Example see below. Thanks.




\csvreader[head to column names,filter=\equal{\gender}{m}]{testdata.csv}{}
{\\\name & \grade} 

\csvreader[head to column names,filter=\equal{\grade}{5.0}]{testdata.csv}{}
{\\\name & \grade} 

\csvreader[head to column names,filter=\equal{\gender}{m} and \equal{\grade}{5.0]{testdata.csv}{}
{\\\name & \grade} 

share|improve this question

enter image description here

the package seems to use ifthenelse internally so you can use that package's boolean expressions involving \and and \or.

So I just changed one line to:

\csvreader[head to column names,filter=\equal{\gender}{m} \and \equal{\grade}{5.0}]{testdata.csv}{}
share|improve this answer
Thank you..... :) – Daniel Jul 6 '12 at 20:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.