Forum Discussion

mtp03's avatar
mtp03
Frequent Visitor
3 years ago

Multiple tables

I have 2 tables that I want to incorporate into 1 combo bar/line graph that can be maniplulated using slicers for date ranges and particular User IDs. My intent is to have bars showing counts for each user and a line showing the goal for each user. One is a massive database of entries that has 50+ attribute fields. My issue is the many to many relationship. I cannot figure out how to write a DAX function to make this work.

 

Simplified large database columns:

  • ID (unique)
  • User ID (many)
  • Month-Year (many)
  • Type(binary)

 

The other table is the goals for each User ID that changes each month:

  • User ID (many)
  • Month-Year (many)
  • Goal (many)

 

I cannot attach the pbix file because it is proprietary information. Please help me!

6 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi mtp03 

    Just create a bridge table containg all the unique user Id's and link it 1 to n with both tables. Then you can use to slice by in you visual. You can create this table using DAX but to avoid any chance of circular dependancy I preffer to have it created in power query or from source.

    • mtp03's avatar
      mtp03
      Frequent Visitor

      I tried this but I also need to be able to slice by month. So I need 2 seperate tables, one for month and one for user id?

    • mtp03's avatar
      mtp03
      Frequent Visitor

      I did this but the problem is the line for goals is just the sum of all for the month (so the bars show the actual entries person but the line is just straight across). I want the line to show the value per User ID. How do I make it reflect that?

      • tamerj1's avatar
        tamerj1
        Community Champion

        mtp03 

        Can you please share a screenshot for better understanding?