I can think of 2 ways to do this:

  1. You can set the data source of the popup as text and your text could be
    Row 1 - {var} | {var} … \n Row 2 - {var} | {var}. This way you can split by \n for the rows and split the row by | to get the
  2. Have groups for different tables within the Popup that you can set, and control the visibility/formatting the RepeatingGroups depending on the same