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

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

Reply
dombarg
Helper II
Helper II

how to create virtual relation with DAX

hello.i have two tables for which i want to make relation based on their similar ID column.for example please have a look at folloing picture:many.JPG

 

 

how is it possible to create relation in both direction with DAX? Am I to summarize left table with some expersion and then relate it with ID column?or something like this?

thanks for your attention.

6 REPLIES 6
Vvelarde
Community Champion
Community Champion

@dombarg

 

Hi, You can use TREATAS.

 

AmountOFTable2RR =
CALCULATE (
    SUM ( Table2[Amount] ),
    TREATAS ( VALUES ( Table1[ID] ), Table2[ID] )
)

Regards

 

Victor




Lima - Peru

thank u very much.seems be amazing.

what if we first : "summarize left table by accont equal to 112" and then relate their relevant ID to right table?

Vvelarde
Community Champion
Community Champion

@dombarg

 

This will be work using a Filter.

 

Regards

 

Victor




Lima - Peru

@Vvelardethank u .you know what the problem is?i want to calculate a ratio in which account number 112 in left table shoud be divided to account 8520 ( in right table ) which is not uniqe.can i do that with your solution?

ChrisMendoza
Resident Rockstar
Resident Rockstar

@dombarg,

 

Will this work for you?

NEWTable = 
DISTINCT(
    UNION ( 
        DISTINCT ( Table1[id] ),
        DISTINCT ( Table2[id] )
    )
)

7.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



thank u .but i won't to establish such relation with Bridge.

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.