Forum Discussion
Add All Columns Except One
- 6 years ago
Since new columns will be added all the time, you don't have a true table, but a Pivoted data set. Start by UnPiviotOtherColumns. This will take ALL Other Columns but the one(s) specified and convert them into 'Attribute' (Column Name) and 'Value' (Number Value previously in each column).
Once done, you can create a simple Table of 'Name' and SUM 'Value' to sum ALL columns other than Name even if the raw input changes. *** I couldn't get this working testing with .csv files, but I think that was because of 'type' of the new columns wasn't being defined. I hope with your real data source you might have better luck... ***
= Table.UnpivotOtherColumns(#"Changed Type", {" Name"}, "Attribute", "Value")
Hi. Just SUM the second column + 1. In Power query you can add a custom column like [column2 name] + 1 or search in the menu the button to add values to a column. In DAX you can write Table[Column2 Name] + 1
Regards,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey thanks for the prompt reply, The column values were just examples, the numbers are more complex than the example. The problem I am having is the number of extra columns is not specified because the client is inputting values into our CRM.