I am labelling my first table and then referencing it later, but the number that comes up when I reference it is completely different from the one in the caption. I am expecting Table 1, but I am getting Table 1.1. Here are the relevant parts of the table and how I reference the table
\begin{table}
\begin{center}
\begin{tabular}{l r r l r c c c c}
\end{tabular}
\end{center}
\label{table:a}
\caption{This is a cool caption}
\end{table}
Table~\ref{table:firstOne}
\labelmust be placed after\caption. This way you use some 'random' counter that was increased by\refstepcounterbefore, but not the table counter (which is increased by\caption). And\ref{table:a}would work better ;-) – Oct 12 '15 at 00:20