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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DeepDive
Helper IV
Helper IV

How to get Target Vs Ach, when multiple table joins required ?

Hello All,

Am unable to get Target Vs ach, My data is available in 3 tables. One is Sales data, Second is team mapping and third one is target table, problem here is Sales data linked to Team mapping file via customer and target is available by Sales Manager2 and by Brand in Target table. I need my output in below format.. I tried something but unable to solve the query... below is some code and also PBIX file is attached... Experts pls suggest with the best solution :

 

file link : https://drive.google.com/file/d/1Ca--t2D9abXK6NZkal07zCfjIB1XP6kt/view?usp=sharing

 

Code Tried :

Table =
Filter(
CrossJoin(

SelectColumns(
Sales,
"Sales_CustomerID", Sales[CustomerID],
"Sales_Brand", Sales[Brand],
"Sales_Qty", Sales[Qty]
),
SelectColumns(
TeamMapping,
"TeamMapping_CustomerID", TeamMapping[Cutomer],
"TeamMapping_SalesManagerL2", TeamMapping[SalesManagerL2]
),
SelectColumns(
Target,
"Target_Brand", Target[Brand],
"Target_SalesManagerL2", Target[SalesManagerL2],
"Target_Target", Target[Target]
)),
[Sales_CustomerID] = [TeamMapping_CustomerID]
&& [Sales_Brand] = [Target_Brand]
&& [TeamMapping_SalesManagerL2] = [Target_SalesManagerL2]
)
 
Below Tables are available and Need to get Output in below format
...TargetVsAch.png
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@DeepDive 

Rather than combining the sales and targets into a new table, you want look up tables for Managers, Brands and Dates.  Then you use the higher level tables to slice up your detail.

DeepDiveModel.jpg

I have update your file with the additional tables and attached it.

You should also take a look at the SQLBI Intro to DAX video course for some more info.  https://www.sqlbi.com/p/introducing-dax-video-course/. It's free

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@DeepDive 

Rather than combining the sales and targets into a new table, you want look up tables for Managers, Brands and Dates.  Then you use the higher level tables to slice up your detail.

DeepDiveModel.jpg

I have update your file with the additional tables and attached it.

You should also take a look at the SQLBI Intro to DAX video course for some more info.  https://www.sqlbi.com/p/introducing-dax-video-course/. It's free

Thanks a lot @jdbuchanan71 for your solution and valuable guidance.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors