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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create Relationship Between 2 Tables

I need to create relationship between the 2 tables below to create same measure in both tables:

  1. Exception Summary table - (measure: % parcels with an Exception scan = SUM(NUM_OF_PARCELS_WITH_EXCP_SCAN) / SUM(NUMBER_OF_PARCELS_NOT_ON_TIME)
  2. Exception Detail table - (measure: % parcels with an Exception scan = COUNT(*) / NUMBER_OF_PARCELS_NOT_ON_TIME)

The NUMBER_OF_PARCELS_NOT_ON_TIME column is only present in table 1 but not table 2 so how do I create relationship to use this column in table 2 measure?

Here is the pbix file for reference.

Screenshot 2020-10-27 191803.png

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description, if you only want to create a measure with two column in different tables, it can be used directly.

Like this:

Measure = DIVIDE(SUM('Exception Summary'[NUM_OF_PARCELS_WITH_EXCP_SCAN]),SUM('Exception Summary'[NUMBER_OF_PARCELS_NOT_ON_TIME]))

Measure 2 = DIVIDE(SUM('Exception Detail'[COUNT(*)]),SUM('Exception Summary'[NUMBER_OF_PARCELS_NOT_ON_TIME]))

And you can’t define two measures with the same name. If you don’t want to calculate total, please add some requirements,so we can help you.

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description, if you only want to create a measure with two column in different tables, it can be used directly.

Like this:

Measure = DIVIDE(SUM('Exception Summary'[NUM_OF_PARCELS_WITH_EXCP_SCAN]),SUM('Exception Summary'[NUMBER_OF_PARCELS_NOT_ON_TIME]))

Measure 2 = DIVIDE(SUM('Exception Detail'[COUNT(*)]),SUM('Exception Summary'[NUMBER_OF_PARCELS_NOT_ON_TIME]))

And you can’t define two measures with the same name. If you don’t want to calculate total, please add some requirements,so we can help you.

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Not very clear. you can use a measure like one of the two

sum('Excep Detail'[NUMBER_OF_PARCELS_NOT_ON_TIME])
sum('Excep Summary'[NUMBER_OF_PARCELS_NOT_ON_TIME])

 

 

Anonymous
Not applicable

Hi @amitchandak, sorry for the confusion. I have edited my initial post to clarify a bit more. Hope it makes sense.

@stevedep fyi if you have any thoughts?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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