Forum Discussion
Trodo737
2 years agoFrequent Visitor
Left join with three tables
I have three tables, T1, T2 and T3. T2 has relation with T1 and T3 but T1 and T3 don't have any relation. How can I convert the following SQL to DAX: SELECT
t2.col1
,FORMAT(SUM(CAST...
Trodo737
2 years agoFrequent Visitor
Thanks bhanu_gautam
As I mentioned there is no relationship between T1 and T3 but each of them has relationship to T2 on different columns(IDnr and identifiernr).
I tested your suggested dax code, it works but it shows the same result(for SUMX) for all rows(without VAR FilteredT3). When I run SQL query getting different nummers for each rows:
In both t2.col1 and t3.col5 there are other rows, this is just an example of the result I'm trying to get with dax code.
bhanu_gautam
2 years agoSuper User
Trodo737 , You can try this measue if still there is still issue can you share sample data
dax
Total =
CALCULATE(
FORMAT(
SUMX(
T1,
T1[cal7]
),
"### ### ### ###"
),
T3[col4] = "LastReport"
)