This is very near to my topic: How to align integers on the right, but still center them. However, I do not get it to work under LyX. This is the code I have:
\begin{table}[H]
\centering
\begin{threeparttable}\caption{\textbf{\label{tab:uebersicht-alle-mspatienten}Untersuchungsergebnisse der soziodemographischen und neurologischen Parameter aller untersuchten MS-Patienten} }
\begin{tabular}{>{\raggedright}p{0.35\columnwidth}>{\centering}p{0.1\columnwidth}>{\centering}p{0.1\columnwidth}>{\centering}p{0.1\columnwidth}>{\centering}p{0.1\columnwidth}}
\toprule
& \textbf{Anzahl (n)} & \textbf{Prozent} & \textbf{Mittelwert} & \textbf{SD}\tabularnewline
\midrule
\midrule
\textbf{Patienten} & 180 & & & \tabularnewline
\midrule
\textbf{Alter} (in Jahren) & & & 43,9 & 13,1\tabularnewline
\midrule
\textbf{Geschlecht:}
- Weiblich
- Männlich & ~
125
55 & ~
69,4
30,6 & & \tabularnewline
\midrule
\textbf{Erkrankungsdauer der MS}
(in Jahren) & & & 12,3 & 8,8\tabularnewline
\midrule
\textbf{Verlaufsform:}
- RRMS
- SCP
- PPMS
- CIS & ~
86
67
24
3 & ~
47,8
37,2
13,3
1,7 & & \tabularnewline
\midrule
\end{tabular}
\end{threeparttable}
\end{table}
It produces the following (correct) output:

However, if I change the first line to:
\begin{tabular}{>{\raggedright}p{0.35\columnwidth}S[table-format=3.0]>{\centering}p{0.1\columnwidth}>{\centering}p{0.1\columnwidth}>{\centering}p{0.1\columnwidth}}
it gives the following (incorrect) output:

My version of siunitx is 2.2i (2011/06/15) from TeX Live 2011.

instead of
Is there sth. I'm missing ?
S[table-format=3.0]column definition. – Werner Dec 19 '11 at 22:07siunitxpackage? If so, what version do you have (add\listfilesbefore\documentclassand view the contents of your.logfile after**File List**)? The most recent version on CTAN is2011/12/11 v2.4e. – Werner Dec 19 '11 at 22:15