Forum Discussion

SuperSayan's avatar
SuperSayan
Icon for Resolver I rankResolver I
9 years ago
Solved

Data organisation and tables relationship

Hello Everyone,   I'm starting with PowerBI and created a bunch of reports and now I'm facing a new challenge with my data. I have a table of interventions with an intervention type (V01, V02,V05....
  • SivaMani's avatar
    SivaMani
    9 years ago

    SuperSayan,

     

    You're on the right path. Just set cross filter direction as both.

     

    That's it

     

    If you're not satisfied with this relationship, go for merge queries option in Query Editor.

     

     

    Regards,

    Siva

  • SuperSayan's avatar
    SuperSayan
    8 years ago

    Hi v-ljerr-msft SivaMani

     

    Sorry for coming back to you that late.

    I was a bit struggling on this one and actually stumbled into the solution while looking for someting else.

    Actually SivaMani mentioned it in the second part of his message but I was a bit too ignorant on the query part to understand it.

     

    Here is the step by step to create a table in the middle to tackle this issue.

     

    https://blogs.technet.microsoft.com/cansql/2016/12/19/relationships-in-power-bi-fixing-one-of-the-columns-must-have-unique-values-error-message/

     

     

    In addition to the above I needed to be able to access data in a table that was not directly linked to my working table.

    In order to do that, I adapted the below formula to fit my needs: 

     

    New Column = 
    var JoinCol = 'TableA'[ID]
    var NewCol = CALCULATE(MAX('TimeZone'[Value]),'TimeZone'[ID]=JoinCol)
    return NewCol