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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SLR_PBI
Regular Visitor

SQL to DAX Help

Hey Friends,

Can you please help me to convert below sql to DAX .

 

 

SELECT COUNT(B.Parent_SID) Parent_Count,  FullName FROM [BI].[Fact_OutboundCalls] A INNER JOIN [BI].[Dim_Parent] B ON A.DialedNumber = B.PHONE

       INNER JOIN [BI].[Dim_Employee] C ON A.Employee_SID = C.Employee_SID

    GROUP BY   C.FullName

1 REPLY 1
Washivale
Resolver V
Resolver V

Considering you have below relationships in your Power BI data model

 

B[Phone] = A[DialedNumber]
C[Employee_SID] = A[EmployeeSID]

 

you can use below to create table using DAX

SUMMARIZECOLUMNS(c[FullName],"Parent_Count", Count(b[Parent_SID]))
 
*if you have many to many relationship, i would suggest to create a table with Unique values to join both tables and create star schema structure.
let me know if it helps.
 
Thank You,
Sandeep

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors