Forum Discussion

eric142's avatar
eric142
Frequent Visitor
4 years ago

Need help in trying to create a relationship

I am new to Power BI and am having a hard time trying to figure out how to do a relationship to one of my tables.

 

This is a small sample of my spreadsheet that I am using, what I am trying to do is relationship between the columns of the blue table (columns 4,6,8,10) and the orange and green table.  Each column in the blue table (4,6,8,10) is an inspection that either passes or fails, but also each question has a category that it belongs to.  How can I get a relationship between the columns in one table to the rows of another table?  Ultimately wanting to use the data in a graph that can be filtered through by date from the blue table.

My graph comes out like this now, because there is no relationship to the category table, I can’t use the category name as a legend.

To get this data I am adding a new column that changes all the Pass answers to 0 and all the Fail to a 1 then adding a new column that sums that column.  

= Table.AddColumn(#"Added Conditional Column2", "Ethernet_Cable", each if [10] = "Fail" then 1 else 0)

CosmeticDeffect = Table1[Serial_Number_Total_Failure] + Table1[Ethernet_Cable]

 

There is going to be over a hundred inspections that fall into one of 13 categories any ideas how to do this?

 

If you need more information, please let me know, Thank you so much for any help.

Eric

2 Replies

  • Hi eric142

     

    In Power BI edit your blue table using the Power Query editor wizard

     

    Select the the catagory columns:

    • verify serial number
    • Front kick plare
    • modern velrco
    • and Ethernet columns 

       Click Transform and Unpivot Columns

       

      Congrats, you now have a normal tables that you can join and do looks up on.

       

      Please click thumbs up and accept as as solution buttons, Thanks 

       

       

    • eric142's avatar
      eric142
      Frequent Visitor

      speedramps 

      Thank you for that information I played with and still can't seem to get what I need.

      I had to change my spread sheet and was able to get it to work thank you.