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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Maahmohammed
Helper I
Helper I

inactive relationship in visual tables

I have 2 table with inactive relationship.

I know well how to use "userelationship" to activate the inactive one.

But my question is very simple but difficult for me to resolve.

i need to build a new table (visual) having one column from the 1st table with another column from the 2nd table, how could i do that?

noting that both are columns not measures.

i tried to convert one of those column into a measure to use "userelationship", but i couldn't.

Regards

 

3 ACCEPTED SOLUTIONS
LeandroDeodato
Resolver II
Resolver II

Hi,

Powerquery can do this for you using merge tables.

View solution in original post

suparnababu8
Super User
Super User

@Maahmohammed 
I think you can use LOOKUPVALUE or RELATED dax functions to fix this issue.

If you provide more details/sample data, It'll be great for us to fix the issue.

If you need information about above DAX functions, pls follow the below links
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
RELATED function (DAX) - DAX | Microsoft Learn

Thanks!

View solution in original post

sanalytics
Super User
Super User

@Maahmohammed 
if I understood your requirement correctly, you need to build a table visual which will take a 1 column from first table and 2nd column from another table. Both tables having inactive relationship and both should be column. if it is, then consider the below model,

I have taken two tables, DimDate and FactSales and both having inactive 1 to many relationship. 

sanalytics_0-1725780341315.png

I just wanted to show unique list of Order id (FactSales) under each month & Year ( DimDate).

sanalytics_1-1725780531709.png

For example, in Sep2013, it is showing 4 unique order.
The easy way to achive this, create a measure and then hide this.

Step 1 : I have created a measure which will help to active the inactive relationship,

 

CALCULATE(
    DISTINCTCOUNT( FactSales[OrderID(DG)] ),
    USERELATIONSHIP( DimDate[DateSK], FactSales[OrderDateSK] )
)

 

Step 2 : Go to the Values and Column header section and turned off the text wrap option.

sanalytics_2-1725780770011.png

 

Below is the attached file.

https://we.tl/t-U4GyRbCX46

Hope it helps.

Regards

sanalytics

If it is your solution then please like and accept it as solution

 

 

 

 

View solution in original post

4 REPLIES 4
sanalytics
Super User
Super User

@Maahmohammed 
if I understood your requirement correctly, you need to build a table visual which will take a 1 column from first table and 2nd column from another table. Both tables having inactive relationship and both should be column. if it is, then consider the below model,

I have taken two tables, DimDate and FactSales and both having inactive 1 to many relationship. 

sanalytics_0-1725780341315.png

I just wanted to show unique list of Order id (FactSales) under each month & Year ( DimDate).

sanalytics_1-1725780531709.png

For example, in Sep2013, it is showing 4 unique order.
The easy way to achive this, create a measure and then hide this.

Step 1 : I have created a measure which will help to active the inactive relationship,

 

CALCULATE(
    DISTINCTCOUNT( FactSales[OrderID(DG)] ),
    USERELATIONSHIP( DimDate[DateSK], FactSales[OrderDateSK] )
)

 

Step 2 : Go to the Values and Column header section and turned off the text wrap option.

sanalytics_2-1725780770011.png

 

Below is the attached file.

https://we.tl/t-U4GyRbCX46

Hope it helps.

Regards

sanalytics

If it is your solution then please like and accept it as solution

 

 

 

 

suparnababu8
Super User
Super User

@Maahmohammed 
I think you can use LOOKUPVALUE or RELATED dax functions to fix this issue.

If you provide more details/sample data, It'll be great for us to fix the issue.

If you need information about above DAX functions, pls follow the below links
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
RELATED function (DAX) - DAX | Microsoft Learn

Thanks!

Ritaf1983
Super User
Super User

Hi @Maahmohammed 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
LeandroDeodato
Resolver II
Resolver II

Hi,

Powerquery can do this for you using merge tables.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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