Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
amaher
Frequent Visitor

SUM FOR BIG ROW

there is a column for each day for the year including amount of sales for each store, i need to sum all sales for each branch for all the year,

 

i need to sum the full row,

 

amaher_0-1735111420538.png

 

7 REPLIES 7
amaher
Frequent Visitor

thanks all, i solve this by go to PQ and select wich columns i need to calculate thire row and creat table with auto sum for it,

 

i don't know if this the best solution or not

 

Anonymous
Not applicable

Hi @amaher ,

I am happy to learn that you found the cause of the problem and fixed it.

Please accept your own reply or any of the other responses that have helped you as a solution, it will make it easier for other users who may be experiencing the same problem to find a solution.

Thanks for your understanding!

Best regards,

Lucy Chen

Anonymous
Not applicable

Thanks for the reply from ryan_mayu and danextian, your replies are all fantastic!

Hi @amaher ,

I used the code ryan_mayu provided and was able to achieve the results you are looking for! I tried another logic and was able to implement it successfully as well.

 

List.Sum(Record.ToList(Record.SelectFields(_, List.Skip(Record.FieldNames(_), 1))))

 

1.png

In addition to providing the error message you encountered, could you please provide example data or sample files here if you have any confused? We could offer you more help if we have information in detail. There is sensitive data that can be removed in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Thanks for your understanding. Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.

Best regards,

Lucy Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@amaher 

you can also try this in PQ

 

=List.Sum(List.Skip( Record.ToList(_),2))

 

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




give me error

what's the error message?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




danextian
Super User
Super User

Hi @amaher 

 

Your table is not in the best format for reporting. Each period must have its own row as below.

danextian_0-1735112121337.png

 

In the query editor, select the first two columns and click unpivot other columns. Please refer to this - https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882... 
This is Power Query in Excel but the GUI is about the same as in Power BI.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.