Forum Discussion

m-colbert's avatar
m-colbert
Icon for Resolver III rankResolver III
1 year ago

PBI Not Applying Relationship between Imported Table and Calculated Table

I have a dimension table called Plant, it has a unique column PlantId. This table relates to 3 other imported fact tables just fine with one-to-many relationship. 

I created a calculated table in DAX that creates a set of KPI Score Streaks (i.e this KPI has been increasing/decreasing 'x' number of months in a row). I added a relationship in the model editor and it detects a correct one-to-many, but when applying, the relationship is not created. It will however, allow me to create a many-to-many which it is not. PBI will NOT allow me to change the many-to-many, to a one-to-many relationship. In the relationship editor, I try to switch to one-to-many and it does nothing, no changes are applied.

I also tried other dimensional tables like Date. Same outcome. 

I am stumped as to why it won't allow this relationship to be created.

I event tried TMDL to adjust the relationship and that just gives me a useless error. 

3/12/20253:33:32 PM[error]Failed to apply TMDL script. Please try again.

 

Any assistance is greatly appreciated.

6 Replies

  • m-colbert are you creating the relationship of this calculated table with the table that has unique plant id column? 

    • m-colbert's avatar
      m-colbert
      Icon for Resolver III rankResolver III

      parry2k 

       

      Yes, the calculated table is HealthScore Streaks and aslso has a PlantId.

      • v-saisrao-msft's avatar
        v-saisrao-msft
        Icon for Community Support rankCommunity Support

        Hi m-colbert ,
        I wanted to check if you had the opportunity to review the information provided by Deku . Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
        Thank you.

  • Deku's avatar
    Deku
    Icon for Super User rankSuper User

    Since you are trying to join a calculated table and it failing I suspect a circular dependancy is at play. You need to use functions that don't include the SSAS's include blank row, so you can use distinct or allnoblankrow, but not values or all.

     

    See this SQLBI article on the topic

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Icon for Community Support rankCommunity Support

    Hi m-colbert,

     

    We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.

     

    Thank you.