Forum Discussion

Maahmohammed's avatar
Maahmohammed
Helper I
1 year ago
Solved

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 ...
  • LeandroDeodato's avatar
    1 year ago

    Hi,

    Powerquery can do this for you using merge tables.

  • sanalytics's avatar
    1 year ago

    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. 

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

    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.

     

    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