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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
diogovaz
Frequent Visitor

SQL to DAX inner join in Direct Query

Hi everyone,

 

I'm trying to create a measure that give me the SUM of value of a table A.

And the query that I have in SQL is:

SELECT SUM (VALUE)
FROM A
INNER JOIN B on A.ID = B.T_ID
INNER JOIN C on B.P_ID = C.ID
INNER JOIN D on C.P_L_ID = D.ID
INNER JOIN E on D.P_D_ID = E.ID
INNER JOIN A_2 on C.T_ID = A_2.ID
INNER JOIN F on E.P_G_M_ID = F.ID
INNER JOIN G on F.P_G_ID = F.ID
WHERE A_2 = "XPTO"
AND   D <> 2


All tables are link in dataset model but it doesn't work.

There any chance to do it by DAX ?

 

Thanks,

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@diogovaz,

 

You may take a look at the following articles.

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

Thanks for you answer.

But this doesn't help me at all. 

I just seacrh and I cannot find a way to do a DAX formula that gives me a simple sum.

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.