How to make table with rotated table headers in LaTeX

Using \rlap makes it easier to position text without additional space. And if you want the label "Processes" outside then use \cmidrule{2-12} and \cmidrule[1pt]{2-12} instead.

\documentclass{article}
\usepackage{array,graphicx}
\usepackage{booktabs}
\usepackage{pifont}

\newcommand*\rot{\rotatebox{90}}
\newcommand*\OK{\ding{51}}

\begin{document}

\begin{table} \centering
    \begin{tabular}{@{} cl*{10}c @{}}
        & & \multicolumn{10}{c}{Knowledge Areas} \\[2ex]
        & & \rot{Integration} & \rot{Scope} & \rot{Time} & \rot{Cost} 
        & \rot{Quality} & \rot{Human Resource} & \rot{Communication} 
        & \rot{Risk} & \rot{Procurement} & \rot{\shortstack[l]{Stakeholder\\Management}} \\
        \cmidrule{2-12}
        & Initiating             & \OK &   &   &   &   &   & \OK &   &   & \OK \\
        & Planning               & \OK & \OK & \OK & \OK & \OK & \OK & \OK & \OK & \OK & \OK \\
        & Executing              & \OK &   &   &   & \OK & \OK & \OK &   & \OK & \OK \\
        & Monitoring and Control & \OK & \OK & \OK & \OK & \OK &   & \OK & \OK & \OK & \OK \\
 \rot{\rlap{~Processes}}
        & Closing                & \OK &   &   &   &   &   & \OK &   & \OK & \OK \\
        \cmidrule[1pt]{2-12}
    \end{tabular}
    \caption{Some caption}
\end{table}

\end{document}

enter image description here

and the same colored:

\documentclass{article}
\usepackage{array,graphicx}
\usepackage{booktabs}
\usepackage{pifont}
\usepackage[table]{xcolor}

\newcommand*\rot{\rotatebox{90}}
\newcommand*\OK{\ding{51}}

\begin{document}

\begin{table} \centering
\begin{tabular}{@{} cr*{10}c }
   & & \multicolumn{10}{c}{Knowledge Areas} \\[2ex]
\rowcolor{blue!30} \cellcolor{white}
   & & \rot{Integration} & \rot{Scope} & \rot{Time} & \rot{Cost} 
   & \rot{Quality} & \rot{Human Resource~} & \rot{Communication} 
   & \rot{Risk} & \rot{Procurement} & \rot{\shortstack[l]{Stakeholder\\Management}} \\
        \cmidrule{2-12}
\rowcolor{black!15} \cellcolor{white}
   & Initiating   &\OK &    &    &    &    &    &\OK &    &    &\OK \\
   & Planning     &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK \\
\rowcolor{black!15} \cellcolor{white}
   & Executing    &\OK &    &    &    &\OK &\OK &\OK &    &\OK &\OK \\
   & Monitoring and Control 
                  &\OK &\OK &\OK &\OK &\OK &    &\OK &\OK &\OK &\OK \\
\rowcolor{black!15} \cellcolor{white}
 \rot{\rlap{~Processes}}
   & Closing      &\OK &    &    &    &    &    &\OK &    &\OK &\OK \\
        \cmidrule[1pt]{2-12}
    \end{tabular}
    \caption{Some caption}
\end{table}

\end{document}

enter image description here


When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.

It isn't perfect. Perhaps aligning the Processes to the right is better.

You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.

\documentclass{article}
\usepackage{booktabs}
\newcommand*\ON[0]{$\surd$}

\begin{document}

\begin{table}
    \begin{center}
    \begin{tabular}{@{}lccccc@{}}
           & \multicolumn{5}{c}{\textbf{Processes}}
    \\  \cmidrule{2-6}
           & & & & \textbf{Monitoring}
    \\       \textbf{Knowledge Areas}
           & \textbf{Initiating}
           & \textbf{Planning}
           & \textbf{Executing}
           & \textbf{\&\ Control}
           & \textbf{Costing}
    \\ \midrule
       \textbf{Integration}    & \ON & \ON & \ON & \ON & \ON
    \\ \textbf{Scope}          &     & \ON &     & \ON &
    \\ \textbf{Time}           &     & \ON &     & \ON &
    \\ \textbf{Cost}           &     & \ON &     & \ON &
    \\ \textbf{Quality}        &     & \ON & \ON & \ON &
    \\ \textbf{Human Resource} &     & \ON & \ON &     &
    \\ \textbf{Communication}  & \ON & \ON & \ON & \ON & \ON
    \\ \textbf{Risk}           &     & \ON &     & \ON &
    \\ \textbf{Procurement}    &     & \ON & \ON & \ON & \ON
    \\ \textbf{Stakeholder
               Management}     & \ON & \ON & \ON & \ON & \ON
    \\ \bottomrule
    \end{tabular}
    \caption{Some caption}
    \end{center}
\end{table}

\end{document}

Table


I had made a similar table for my use.

enter image description here

\documentclass[oneside, 10pt, a4paper]{article}

\usepackage{multirow}
\usepackage{graphicx}
\usepackage{booktabs}

\newcommand{\mcrot}[4]{\multicolumn{#1}{#2}{\rlap{\rotatebox{#3}{#4}~}}} 

\newcommand*{\twoelementtable}[3][l]%
{%  
    \renewcommand{\arraystretch}{0.8}%
    \begin{tabular}[t]{@{}#1@{}}%
        #2\tabularnewline
        #3%
    \end{tabular}%
}

\begin{document}

\begin{table}[h] \label{tab:activityTracking}
    \centering
    \caption{Tracking daily activities.}
\begin{tabular}{ *2{ll|} *6c | *6c }
    \\
    \multicolumn{2}{c}{Date}  & \multicolumn{1}{c}{Start} & \multicolumn{1}{c}{Stop} 
        & \mcrot{1}{l}{60}{Activity 1} & \mcrot{1}{l}{60}{Analysis} & \mcrot{1}{l}{60}{\twoelementtable{No. of}{processes}} & \phantom{p}& \mcrot{1}{l}{60}{Result} & \mcrot{1}{l}{60}{Backup} 
        & \mcrot{1}{l}{60}{Activity 2} & \mcrot{1}{l}{60}{Analysis} & \mcrot{1}{l}{60}{\twoelementtable{No. of}{processes}} & \phantom{p} & \mcrot{1}{l}{60}{Result} & \mcrot{1}{l}{60}{Backup} \\
    \midrule \midrule

    \multirow{4}{*}{\rotatebox{90}{\textbf{January}}}
    & 11 & 1:30~am & 10:45~am 
        & x & x & \multicolumn{2}{c}{-} & - & x 
        & - & x & \multicolumn{2}{c}{x} & x & x \\
    & 12 &          &         
        & - & - & \multicolumn{2}{c}{x} & - & - 
        & - & - & \multicolumn{2}{c}{x} & - & - \\
    & 13 &          &         
        & - & - & \multicolumn{2}{c}{x} & - & - 
        & - & - & \multicolumn{2}{c}{x} & - & - \\
    & 14 &          &         
        & - & - & \multicolumn{2}{c}{-} & - & - 
        & - & - & \multicolumn{2}{c}{x} & - & - \\
    \bottomrule
\end{tabular}
\end{table}

\end{document}