Forum Discussion

mtomova's avatar
mtomova
Helper III
1 year ago
Solved

Relationships in data model does not work - breaks table visual

Hi,

 

I have a pretty simple data model, which consists of 3 tables:

 

* property table

* measures table (one property can have multiple measures)

* installation works (one property can have multiple installation works)

 

 

When I try to create a table visual which is including data from all 3 tables I get the below message:

 

 

 

Not quite sure what the problem is in the data model.

 

I have tried having the data model with cross-filter direction = single, but that doesn't help.

Do I need some form of a 'bridge' table to link all 3 tables in order to show data in one visual?

What is the best approach here?

 

Thanks,

Maria

  • Hi mtomova ,
    I wanted to check if you have had an opportunity to try the bridge table approach.

8 Replies

  • Shahid12523's avatar
    Shahid12523
    Community Champion

    Best practice: Keep star schema → use property_table as dimension, and show measures/installation separately.

    If you need both in one row → create a bridge table (property_id, measure_id, task_id).

    If you just need to show related fields → use DAX (LOOKUPVALUE / TREATAS).

    • mtomova's avatar
      mtomova
      Helper III

      Hi, thank you, I thought that the 'bridge' table is the proper approach if we want to combine the data.
      I have never done it before, but will give it a try and see how to relate the tables.

      As for the LOOKUPVALUE, wouldn;t that throw an error, because I will return multiple match per property_id?

      • v-sshirivolu's avatar
        v-sshirivolu
        Community Support

        Hi mtomova ,
        I wanted to check if you have had an opportunity to try the bridge table approach.

  • mtomova, remove bi-directional relationships and it should work just fine 😉 Then filter only by property, because the remaining two are related to this dimensional table.

    Good luck! 🙂

    • mtomova's avatar
      mtomova
      Helper III

      Hi, I have tried that:

       

      and it does not resolved the error. 

       

      Thanks,

      Maria

  • Shahid12523's avatar
    Shahid12523
    Community Champion

    The issue is because both child tables link to property_table, creating a many-to-many path