Forum Discussion

amaher's avatar
amaher
Frequent Visitor
1 year ago

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,

 

 

7 Replies

  • amaher's avatar
    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's avatar
      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's avatar
    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))))

     

    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.