Thursday, May 12, 2022

Validate the row counts of PBI tables in Data Flows

Recently I had to validate the row counts of some existing tables in PBI Data Flows that I was converting over to a new source. So wanted to make sure the row counts matched between the current and new source systems.

A simple way to do this is to add a blank query and use the Table.FromRecords and Table.RowCount functions:

  Source = Table.FromRecords({
        [Table = "Table 1 Original", RowCount = Table.RowCount(#"Table 1 Original")],
        [Table = "Table 1 New", RowCount = Table.RowCount(#"Table 1 New")],
        [Table = "Table 2 Original", RowCount = Table.RowCount(#"Table 2 Original")],
        [Table = "Table 2 New", RowCount = Table.RowCount(#"Table 2 New")]