Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Sum rows to append to another table

Hi all, 

Hoping I can get some help with this, fairly new, still learning - hopefully I have given enough detail.

I am trying to add a column into my dataset which would sum the entire row as opposed to the column. The reason I am doing this is because I want two different reports to be merged as one (I have created a dummy table below for reference) - In an ideal world, both sources would have used the same format of data entry, but alas, why make life easy.

 

In table 1 - The set up is as follows:

 

CLIENTTEAM/LOCATIONWORKTYPEHOURS
ABC LtdUKManagement1
123 LtdUKAdmin0.5
XYZ LLPUSManagement0.1
246 PlcUSAdmin3

 

and it then feeds into a matrix and slicer like so 

 

Slicer: Client
Matrix:

 

WORKTYPEUKUSTOTAL
Management10.11.1
Admin0.533.5
Total1.53.14.6

 

The first report is an automated one pulled from a system, so all the relevant manipulation and sorting has been done in Power Bi. The second report however is one that is manually updated by a team and has has been set up like so (0 in place of hours that will be manually added in) - 

 

CLIENT NAMECATEGORY OF WORK e.g. ProcessingCATEGORY OF WORKCATEGORY OF WORK
 HOURSHOURSHOURS
 Sub category  e.g. PreparationWORKTYPE WORKTYPE 
Management000
Admin000
Other worktypes000
    

 

I've managed to add 2 columns at the end to pull the client name and manually add in a team/location so the table looks like the above with the two additional columns with repeating client names and team/location.

 

I want to ideally somehow get the relevant information from this sheet across and have it feed into the first report so that my visualisation/matrix looks like this:

WORKTYPEUKUSNew locationTOTAL
Management10.101.1
Admin0.5303.5
Other Worktype0000
Total1.53.104.6

 

Hopefully the above makes sense, thanks again!


3 Replies

  • Anonymous 

    You need to first transform the manually entered data into a format that will align with the existing 1st table. Then, union these tables to create a combined table.

    Where do you find it challenging, at which stage?

    ________________________

    Did I answer your question? Mark this post as a solution, this will help others!.

    I accept KUDOS 🙂

    YouTube, LinkedIn

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    The general process is as said by Fowmy .

    However , I'm still not clear  about the structure of your second report.

    Can you display your report and result  with specific fields and data rather than "0","CATEGORY OF WORK e.g. Processing" ,"Sub category  e.g. Preparation".

    It will better help us  to transform your data.

     

    You may check if this related post help.

    https://community.powerbi.com/t5/Desktop/Sum-data-to-new-rows-in-same-table/m-p/885031

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.