Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Dear Power BI Experts,
I'm working on a table which requires to sum 50 columns in a Total column. Could you please help with any measure? I already add a new column but don't know what measure to use to sum such many like that? Thank you in advance.
Best regards,
Dam
Solved! Go to Solution.
Hi,
While it can be easily done in the Query Editor, ideally you should transform your data to show all weeks in a single column. This transformed dataset will be amenable to further analysis. You may transform the dataset by select all columns other than the week columns, right clicking and selecting "Unpviot Other columns".
Hope this helps.
Hi Ashish,
Thanks for your revert. I'd like to do it in Power Query.
Here's data for example, I would like to have total from week 1 to week 52, the blue column is expected sum.
District | Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | Week 10 | Week 11 | Expected total |
Tan Binh | 5 | 3 | 10 | 4 | 7 | 11 | 7 | 11 | 6 | 4 | 5 | 73 |
Phu Nhuan | 8 | 7 | 11 | 6 | 4 | 5 | 4 | 5 | 5 | 10 | 4 | 69 |
Binh Thanh | 8 | 4 | 5 | 5 | 10 | 4 | 7 | 3 | 7 | 11 | 6 | 70 |
Hoc Mon | 4 | 9 | 7 | 7 | 11 | 6 | 4 | 7 | 11 | 6 | 7 | 79 |
Hi,
While it can be easily done in the Query Editor, ideally you should transform your data to show all weeks in a single column. This transformed dataset will be amenable to further analysis. You may transform the dataset by select all columns other than the week columns, right clicking and selecting "Unpviot Other columns".
Hope this helps.
Hi,
Do you want to do this in the Query Editor or in DAX (as a calculated column formula)? Do you want to ad the last 50 columns of the table? Share some data and show the expected result.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |