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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors