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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Oros
Post Patron
Post Patron

Putting together data from 2 companies

Hello.

 

I have 2 separate sales and margin reports from 2 separate companies.  Is possible to have a third report that will show the 2 companies?  Thanks.

 

For example:

COMPANY 1

PRODUCTSALESPROFITYEAR
Apple100102021
Banna20102022

 

COMPANY 2

 

PRODUCTSALESPROFITYEAR
Orange5052021
Banna552022

 

RESULT GRID

 

 COMPANY 1 (2021)

COMPANY 2

(2021)

TOTAL

(2021)

COMPANY 1

(2021)

COMPANY 2

(2022)

TOTAL

(2022)

SALES1005015020525
PROFIT1051510515

 

 

1 ACCEPTED SOLUTION

aha, if the table column headers are the same, it would be easy to stitch (called append in PQ) them in Power Query.

In your case, you may need 

1) to add a Company column, say Company1 in table1 and Company2 in table2, both named "Company", check this:

https://learn.microsoft.com/en-us/power-query/add-custom-column

 

2) Append the two tables, check this:

https://learn.microsoft.com/en-us/power-query/append-queries

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

hi @Oros 
the most similar would be like this:

FreemanZ_3-1670125337746.png


the dataset:

FreemanZ_4-1670125355115.png

 


the point is: the value fields (profit/sales in your case) could be plotted in Matrix Visual like columns but not like rows.

HI @FreemanZ ,

 

Thank you very much for your reply.  Sorry if my post is not clear.  What I would like to achieve is to 'merge' the 2 separate companies tables. Let's say that each table has the same columns as date, sales, products, customers, salespersons.  Please note that these 2 companies have the same salespersons but NOT the same products and customers.  Thanks again

aha, if the table column headers are the same, it would be easy to stitch (called append in PQ) them in Power Query.

In your case, you may need 

1) to add a Company column, say Company1 in table1 and Company2 in table2, both named "Company", check this:

https://learn.microsoft.com/en-us/power-query/add-custom-column

 

2) Append the two tables, check this:

https://learn.microsoft.com/en-us/power-query/append-queries

Thank you @FreemanZ !

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors