Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dates Table Relationship

Hi, I am having issues with relationship. I have two table. One is actual and one is bugdet. When I filter by country (although I create a seperate table), it does not work because they are both linked by Calendar. How can I get this to work?

 

  • Hi Anonymous 

    Which fields do the "calendar" and "actual vs budget" tables connect?

    It seems they have a "many to many" relationship.

    To make the relationship work, it needs a "one to many" relationship.

     

    For example, please take a look at my test.

    I merge "actual" "and "budget" tables to get a new table "actual vs budget",

    Then create another table "country" based on the table "actual vs budget",

    country = VALUES('actual vs budget'[country])

    Assume "period" in the calendar table from your screenshot refer to four quarter one year (1,2,3,4),

     i can create a calendar table as my pbix shown,

    then i create a new table based on this table

    period yyyy table = VALUES('calendar'[period yyyy])

    Finally, with correct relationships, i can filter "actual vs budget" based on country/date period.

     

    Best Regards

    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    Which fields do the "calendar" and "actual vs budget" tables connect?

    It seems they have a "many to many" relationship.

    To make the relationship work, it needs a "one to many" relationship.

     

    For example, please take a look at my test.

    I merge "actual" "and "budget" tables to get a new table "actual vs budget",

    Then create another table "country" based on the table "actual vs budget",

    country = VALUES('actual vs budget'[country])

    Assume "period" in the calendar table from your screenshot refer to four quarter one year (1,2,3,4),

     i can create a calendar table as my pbix shown,

    then i create a new table based on this table

    period yyyy table = VALUES('calendar'[period yyyy])

    Finally, with correct relationships, i can filter "actual vs budget" based on country/date period.

     

    Best Regards

    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    Is this problem sloved? 

    If it is sloved, could you kindly accept it as a solution to close this case?

    If not, please let me know.

     

    Best Regards

    Maggie