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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to combine 2 table into 1 ?

Hi All

 

I have 2 seperate striaght table , i need to combine into one table

Paulyeo11_0-1610165250405.png

Final result i need is  :-

Paulyeo11_1-1610165429036.png

my PBI file :-

https://www.dropbox.com/s/23ij1b2cindwkjx/PBT_SAMPLE%20100%20ROW%20JAN%202021%20V008%20COMBINE%20REV...

 

Paul

 

9 REPLIES 9
parry2k
Super User
Super User

@Paulyeo11 check this post.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

mussaenda
Super User
Super User

Hi, @Paulyeo11 ,

 

You can append the two tables instead of merging them since they have the same number of columns.

Just make sure both tables have the column names so it will append according to your requirement.

 

Hope this helps!

Paulyeo11
Impactful Individual
Impactful Individual

Hi Muss and Parry 

Can one of you share with me how can i append the 2 table ?

Paul

 

Hi @Paulyeo11 ,

 

Were you able to append the tables?

Paulyeo11
Impactful Individual
Impactful Individual

Hi Mussa

Thank you for much for follow up . 

After thinking over , i want to change my approach by Create only one PNL filed , So that i can get P&L summary table , instead of 4 seperate field , which is no so easy , hope you can take a look at below link and share with me how to get PNL field ?

https://community.powerbi.com/t5/Desktop/How-to-create-PNL-filed/td-p/1588736

 

Hi @Paulyeo11 ,

 

Unfortunately, the shared file has been deleted.If the problem persists,could you share the sample pbix again?

 

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

Hi Lianl

 

I have create a new post , and Amain have have advise me the right approach :- 

https://community.powerbi.com/t5/Desktop/How-to-create-PNL-filed/td-p/1588736

 

Paul

 

parry2k
Super User
Super User

@Paulyeo11 why the first column is called 1_REV_.

 

Isn't when these tables are combined it would be called something like category or group etc.

 

I would rename the first column of both the tables (to a common name) and then just append it since the rest of the columns has the common name.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Paulyeo11
Impactful Individual
Impactful Individual

Hi Parry

in order for me to get the REV amount i need to use beow expression :-

1_REV =
SWITCH(TRUE(),
'GL'[Reporting Code]>=00001 &&'GL'[Reporting Code]<=00019,"REV",
BLANK())

in order for me to get the COGS amount i need to use beow expression :-

1_COGS =
SWITCH(TRUE(),
'GL'[Reporting Code]>=00020 &&'GL'[Reporting Code]<=00049,"COGS",
BLANK())
 
Now i need to create table display
 
REV amount
COGS amount
 
it there a more stright forward approach ? Hope you can share with me.
 
Paul Yeo

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.