Forum Discussion

DeepDive's avatar
DeepDive
Icon for Helper IV rankHelper IV
7 years ago
Solved

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
...

2 Replies