By making tables I am using packages siunitx, nicematrix and makecell. These three packages applied simultaneously seems to be sufficient for solving my problems with tables - like this one. I am using siunitx package, not dcolumn package, because the last one gives not satisfying placement of numbers.
I met the problem with placing the table note. The note mark has to be placed in the cell of the middle column. While I am using S-type column within NiceTabular environment I got the error:
! Extra }, or forgotten \endgroup.
<template> ...z@ plus.5fill\relax \egroup \egroup
\begingroup \CT@setup \CT@...
l.23 ...tal & 160\tabularnote{My footnote text.} &
100,0\\
How to solve this problem? It resembles this one (in this topic probably one of @moewe's comments leads to the solution, nevertheless I can't cope with it). Code:
\documentclass[table]{standalone}
\usepackage{siunitx}
\usepackage{makecell}
\usepackage{nicematrix}
\usepackage{enumitem}
\renewcommand{\theadfont}{\footnotesize\bfseries}
\sisetup{output-decimal-marker={,}}
\begin{document}
{\footnotesize
\begin{NiceTabular}[hvlines,code-before=\rowcolor{gray!50}{1-1}]{
l
S[table-format=3,zero-decimal-to-integer,table-space-text-post=\textsuperscript{a}]
S[table-format=3.1]
}
{\thead{Side-heading\description}} &
{\thead{First column\with data\description}} &
{\thead{Second column\with data\description}}\
Good & 120, & 41,5\
Bad & 140, & 58,5\
Total & 260,\tabularnote{My footnote text.} & 100,0\
\end{NiceTabular}
}
\end{document}


721, not721.0. Removing the statementtable-space-text-post=\textsuperscript{a}leads to wrong horizontal placement: the widest string (according to my guidebooks), which in your response is120,5ahas to be centered horizontally in the cell. But addingtable-space-text-post=\textsuperscript{a}gives unwanted space between number and footnotemark. – forrest Sep 29 '20 at 09:48Scolumn type. You can use the keyzero-decimal-to-integerin that column (and you will have100instead of100,0in my example). However, this is not possible in the first column... – F. Pantigny Sep 29 '20 at 11:12\tablenumin that column and do the job by hand. I have put a second answer where I do the whole job by hand (it's an awful workaround). – F. Pantigny Sep 29 '20 at 11:14table-space-text-post=\textsuperscript{a}into\mytablenumdefinition and adjustment by hand\mytablenum{260}\!\!\!\!\tabularnote{\myfootnote}ensures horizontal centering of the cell content. – forrest Sep 29 '20 at 12:33\!\!\!\!is an adjustement 'by hand'... – F. Pantigny Sep 29 '20 at 19:03\hspaceon both sides of footnotemark, for instance\mytablenum{19}{\hspace{-2.8mm}\tabularnote{\myfootnote}\hspace{0.7mm}}. It is because: 1) decimal separators in a given column must be placed on the same vertical line, 2) column content must be horizontally centered with respect to the most protruding elements. Using\!command disturb vertical alignment from the point (1). – forrest Oct 17 '20 at 12:47