Forum Discussion
Relationships - How to make One Column to Multi Column Relationship
Salaam All
I have a below case where I want to create a relation between Polygon Table and Well Name Table, The issue is that can't figure out how to do it, as you can see the Polygon column in polygon table has to filter both polygon1 and polygon2 in Well Name table.
for example, if i choose "B" from polygon table, it should filter the wells "W2" and "W3", by mean any well with "B" polygon either in polygon1 or polygon2.
Your help is really appreciated.
Thanks
- Anonymous3 years ago
Hi saudalomairi ,
I create a sample pbix file(see the attachment), please check if that is what you want.
1. Please DO NOT create any relationship between the table 'Polygon' and 'Well Name'
2. Create a measure as below
Flag = VAR _selpolygons = ALLSELECTED ( 'Polygon'[Polygon] ) VAR _selp1 = SELECTEDVALUE ( 'Well Name'[Polygon1] ) VAR _selp2 = SELECTEDVALUE ( 'Well Name'[Polygon2] ) RETURN IF ( _selp1 IN _selpolygons || _selP2 IN _selpolygons, 1, 0 )3. Create a visual and apply the visual-level filter on the visual with the condition(Flag is 1)
If the above one can't help you get the expected result, please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
2 Replies
- amitchandakSuper User
- AnonymousNot applicable
Hi saudalomairi ,
I create a sample pbix file(see the attachment), please check if that is what you want.
1. Please DO NOT create any relationship between the table 'Polygon' and 'Well Name'
2. Create a measure as below
Flag = VAR _selpolygons = ALLSELECTED ( 'Polygon'[Polygon] ) VAR _selp1 = SELECTEDVALUE ( 'Well Name'[Polygon1] ) VAR _selp2 = SELECTEDVALUE ( 'Well Name'[Polygon2] ) RETURN IF ( _selp1 IN _selpolygons || _selP2 IN _selpolygons, 1, 0 )3. Create a visual and apply the visual-level filter on the visual with the condition(Flag is 1)
If the above one can't help you get the expected result, please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards