how can I get a third column "Z" in the output, where the values are e.g. x*y
\documentclass{article}
\usepackage{pgfplots, pgfplotstable}
\usepackage{filecontents}
\usepackage{booktabs}
\begin{filecontents*}{data.dat}
x y
1 2
2 3
3 4
4 5
\end{filecontents*}
\pgfplotstableset{% global config, for example in the preamble
every last row/.style={after row=\bottomrule},
}
\begin{document}
\pgfplotstabletypeset[every head row/.style={before row={
\toprule},
after row=\midrule},
columns/x/.style={column name=x},
columns/y/.style={column name=y},
]{data.dat}
\end{document}
This is how I would like it to look:
![1]](../../images/a4c922a05b8d8f4cbd89c0f3687330c4.webp)

create on use/<some name>/.style={create col/expr={...}}. – Stefan Pinnow Oct 27 '17 at 05:58