The real trick is to manage your expenses. Carpool where you can. Share housing when you can. Hell, if it's a really expensive table, share that, too. Over time, your sales will improve as you get more comfortable with the game, and the numbers will start to balance out. I started tabling in 2015, and this year was the first time I had cons that ended solidly in the black.
If you are looking to table for the first time, I also recommend starting small. You don't wanna tackle a huge convention on your first go-around. Find smaller zine fests and comic expos in your area. There are plenty where tables are free or fairly inexpensive, and even if you do lose money, it won't be much. Focus on cons that are nearby enough that you can reasonably commute. Learn the craft there, and you'll have a safe and cost-effective environment to experiment and grow.