Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I am trying to do something that seems very simple to me conceptually, but Power BI is not cooperating. All I need to do is add multiple columns together that contain only 0/1 values. I have included a picture that shows various columns that I would need to be summed together.
I have tried every DAX SUM formula I could find online and not a single one has worked (List.Sum, SUM, etc.) This is NOT a live feed and my data is contained within two Excel files that were uploaded. I was able to use the "Standard" button for "Addition" previously, but the button itself now greys out when I select more than one column. All values are typed as "Whole Numbers" so I don't understand why such a basic function is causing me such grief.
Any help would be greatly appreciated!
Hi @Anonymous
If all columns are numeric then you should be able to sum them. NOTE, 2 of the columns in your image are decimal and 2 are whole number. You can still sum them but you said they were all whole number. Worth checking all your data to make sure it's as you expect.
So, try selecting 1 column only at a time then checking if you can sum. Then try selecting 1 col, then 2 cols, then 3 etc each time checking if you can sum. At some point you should find the column(s) that are causing the problem. Check the data in the column.
Regards
Phil
Proud to be a Super User!
I actually already had converted all columns to whole numbers after my initial post, still experiencing the same issue. I am not even able to select 2 columns without the standard button greying out (no matter which 2 I select throughout my entire dataset).
@Anonymous
What happens when you manually add a column using this code
= Table.AddColumn(PreviousStepName, "Addition", each List.Sum({[hotelstay], [lowincome], [vouchers], [utility]}), Int64.Type)
Regards
Phil
Proud to be a Super User!
I get this error:
Expression.Error: The name 'PreviousStepName' wasn't recognized. Make sure it's spelled correctly.
Hi @Anonymous
The Standard button should work to allow you to sum those columns. Can you please supply your file so I can check?
Regards
Phil
Proud to be a Super User!
Unfortunately, I am not able to provide my file as it contains Protected Information.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |