Forum Discussion

vasathi's avatar
vasathi
Icon for Helper II rankHelper II
5 years ago

Relationship for multi company data

Team,

I have problem with Relationship.

Basically i need the following.

In my Datamodel having multiple companies and each companies having their own masters

How to make the relationship to filer masters & transaction as well as.

eg.

When i select the Company, need to filter related the masters (Customer, Product, location etc...) and transaction as well.

I tried relationship for 1st master (CustomerCode) it is working as expected. The same way i enabled for ItemCode and locations and it is showing inactive relationships.

how to overcome this.

Company code is common for master & transactions. But there is no relationships between masters.

Please guide me.

6 Replies

  • vasathi ,Based on what I got

     

    Ideally in such case you should have some combine key like

     

    Company ID - Master Table ID, both in fact and dimension. and use that for join

     

    If not use combinevalues to create one 

    • vasathi's avatar
      vasathi
      Icon for Helper II rankHelper II

      Thanks Amit

       

      I have combined key as well as but still it is showing inactive 

       

       

  • v-xiaotang's avatar
    v-xiaotang
    Icon for Community Support rankCommunity Support

    Hi vasathi 

    There can only be one active filter propagation path between two model tables. For more, pls see

    https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand#make-this-relationship-active

    here's an animated example showing how relationships propagate filters,

    https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand#relationship-purpose

    -

    you can use the USERELATIONSHIP DAX function, which activates filter propagation for a specific relationship only during the evaluation of the expression.

    about how to use USERELATIONSHIP, here's an example, see https://docs.microsoft.com/en-us/power-bi/guidance/relationships-active-inactive#inactive-relationships

     

    For more information, pls read,

    https://docs.microsoft.com/en-us/dax/userelationship-function-dax

    https://www.youtube.com/watch?v=X9rkpt7-LNQ

     

    if problem still persists or more tutorials needed, please let me know.

     

     

    Best Regards,

    Community Support Team _ Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

    • vasathi's avatar
      vasathi
      Icon for Helper II rankHelper II

      Thanks, But these are all i have checked before but no use.

      • v-xiaotang's avatar
        v-xiaotang
        Icon for Community Support rankCommunity Support

        thanks for your reply vasathi 

        but tutorials I attached above are all trying to explain that, why the other relationships are inactive.

        and if you want to use inactive relationship, pls read tutorial about function  USERELATIONSHIP ðŸ¤£

         

        -

         

        Have you solved your problem? If yes, kindly accept the answer helpful as the solution. so the others can find it more quickly.

        Or

        if problem still persists, please let me know.

         

        Best Regards,

        Community Support Team _ Tang

  • Anonymous's avatar
    Anonymous
    Not applicable

    In the context of CRM enrichment, it's crucial to ensure that the company codes in both masters and transactions remain consistent. The relationship between masters and transactions typically hinges on a shared field, often the company code. As part of CRM enrichment practices, it's essential to verify that the company codes are uniform in both master and transaction tables to maintain data accuracy and integrity.

    If discrepancies arise, it's important to address them promptly. In the realm of CRM enrichment, inactive relationships can be a concern. To troubleshoot, investigate and resolve any conflicts within the relationships. For instance, an inactive relationship may occur due to ambiguous relationships or circular dependencies. Thoroughly check for such issues and implement solutions to reestablish the integrity of the CRM data.

    As a best practice in CRM enrichment strategies, consider adopting a more granular approach to relationships. Instead of having a single relationship for all masters, create distinct relationships for each master category (e.g., Customer, Product, Location). This not only helps in avoiding conflicts but also enhances the manageability of relationships within the CRM system. By segmenting relationships based on specific master types, CRM enrichment efforts can be more targeted and efficient, leading to improved data quality and a more streamlined CRM process.