cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dombarg Regular Visitor
Regular Visitor

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
Super User I
Super User I

Re: how to create virtual relation with DAX

@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!

Proud to be a Super User!




dombarg Regular Visitor
Regular Visitor

Re: how to create virtual relation with DAX

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

Vvelarde Super Contributor
Super Contributor

Re: how to create virtual relation with DAX

@dombarg

 

Hi, You can use TREATAS.

 

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

Regards

 

Victor




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




dombarg Regular Visitor
Regular Visitor

Re: how to create virtual relation with DAX

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 Super Contributor
Super Contributor

Re: how to create virtual relation with DAX

@dombarg

 

This will be work using a Filter.

 

Regards

 

Victor




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




dombarg Regular Visitor
Regular Visitor

Re: how to create virtual relation with DAX

@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?

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors