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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JMJM
New Member

Need Help with Dax

Having three tables, Table A is a one-to-many relationship to Table B and Table B is a one-to-many relationship to Table C, and I would like to get a calculated column "value" in the form of Result desired table. Anyone could help?

 

Table A

Contract Number
123
234
456

 

Table B 

Contract NumberActivity ID
1230001
2340002
4560003

 

Table C

Activity IDValue
0001100
0002200
0003300

 

Result desired: (Table A)

Contract Number Value (From Table C)
123100
234200
456300
1 ACCEPTED SOLUTION
barritown
Super User
Super User

Hi @JMJM,

 

With your mock data this calculated column in Table A will probably do the job:

Value = CALCULATE ( MAX ( 'Table C'[Value] ) )

But one to many means that you can have 2 entries in Table C with Activity ID = 0003 and values 300 and 400. Which value do you expect to receive as a result? 

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

View solution in original post

1 REPLY 1
barritown
Super User
Super User

Hi @JMJM,

 

With your mock data this calculated column in Table A will probably do the job:

Value = CALCULATE ( MAX ( 'Table C'[Value] ) )

But one to many means that you can have 2 entries in Table C with Activity ID = 0003 and values 300 and 400. Which value do you expect to receive as a result? 

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.