Qualified Business Income deduction

My small business falls in the QBI deduction category but I'm not sure if all of my sub-s corp earnings are allowed to be considered for the deduction? Part of my work is "consulting" to small businesses while the other part is technology troubleshooting, repair and setup of computer hardware/software. How does the QBI deduction work specifically?