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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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