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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
careyd
Regular Visitor

DAX approach to finding which parent records have no related records

*If I am not supposed to post a question here, please let me know. Thanks!*

Thanks for reading and for helping if you can. I have not been able to come up with a solution for this. I am just learning DAX and appreciate any guidance. 

 

Table A has a one>many cardinality with Table B.

Some Table A records do not have related records in Table B.

When a Table A record DOES NOT have a foreign key in Table B, I want to use a value from a Table A column.

When a Table A record DOES have a foreign key in Table B, I want to sum the values in a Table B column.

 

Table A (Tasks)               Table B - Assignments          Table A Calculated Value in Power Pivot

Key: 1                             Foreign Key: 1                       Sum of Table B[Assign_hours] = 4.5     

Plan_Hours = 5              Assign_Hours = 2

                                      Foreign Key: 1

                                      Assign_Hours = 1.5   

  

Key: 2                             (no record)                             Table A Plan_Hours = 3

Plan_Hours = 3

 

Thank you!

 

 

 

1 ACCEPTED SOLUTION

Yes most of the table functions are available in power pivot. You can use any function in your measures and calculated tables but the final result of your calculation must be a scalar value. if a table is returned you will receive an error.

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @careyd 

power pivot does not have a calculated table feature. Do you mean power query, power bi or pivot table?

Thanks for the reply @tamerj1! That may be the root of the problem, then. Though I do see a CALCULATETABLE function when working with DAX in Power Pivot. 

Yes most of the table functions are available in power pivot. You can use any function in your measures and calculated tables but the final result of your calculation must be a scalar value. if a table is returned you will receive an error.

Okay. I appreciate your insight. I'll investigate a different approach. Thank you! 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.