UnPivot columns in Microsoft Power BI and your data may stop adding up

Unpivot Columns

In Power BI, Unpivot Columns transforms columns into rows with attributes and values. In other words, it changes the data structure and as a result it can change values in a visualization.

Other ColumnsApplesOrangesBananas

In the table above, we can sum the values in any of the columns. For example, The sum of the column named Other Columns is 5.

Other ColumnsAttributeValue

After the Apples, Oranges, and Bananas columns are unpivoted, the structure of the table has changed. A row is created for each Attribute (previous Column name) and Value. This extends to other columns. See how the left-most column has it’s values repeated. That is what happens to the data in the columns that remain pivoted. Now the sum of Other Columns appears to be 15.

If there was already a visualization on the report with the original value of Other Columns that value will change when columns are unpivoted.