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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sac1995
Regular Visitor

combining calculated columns from two separate tables both linked to a common table

Hello,

 

Situation: I am trying to categorize company spend (IT, services, supplies, etc) and there are two data sources. Both of these sources have an Accounting code for each transaction. To get the spend category, I have a master table that shows the corresponding spend category to each code. In BI, I have both sources linked to the same master table. I have created calculated columns in each table to find the spend subcategory and parent category. However, I am unable to combine these two sources so that I can create visualizations. Does anyone have any suggestions/guidance?

 

Example:

Source 1:

DateVendorDescriptionG/L AccountSubcategory (Calculated Column)Category (Calculated Column)Spend
6/6/2019ABC Vendorpens5400Office SuppliesCorporate$5,500
6/7/2019XYZ VendorPower bi5475SoftwareIT$50,000
6/8/2019FGH Vendordata entry5070Purchased ServicesProfessional Services

$10,000

 

Source 2:

DateVendorDescriptionG/L AccountSubcategory (Calculated Column)Category (Calculated Column)Spend
6/6/2019QRS Vendorpencils5400Office SuppliesCorporate$5,500
6/7/2019LMN Vendorlaptop5470HardwareIT$50,000
6/8/2019UVW VendorTemp Labor5070Purchased ServicesProfessional Services$10,000

 

In the resulting table, I'd have 6 rows, and if I create a visualization, I'd see that $20,000 was spent on Purchased Services in June from two different companies.

 

Thank you!

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @sac1995 ,

For your scenario, you could try to append the two query in query editor like below.

Append queries.PNG

Then you could get the output.

Capture.PNG

Best Regards,

Cherry

 

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

View solution in original post

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @sac1995 ,

For your scenario, you could try to append the two query in query editor like below.

Append queries.PNG

Then you could get the output.

Capture.PNG

Best Regards,

Cherry

 

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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