Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mtp03
Frequent Visitor

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 6
tamerj1
Super User
Super User

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
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?

@mtp03 

Can you please share a screenshot for better understanding?

mtp03
Frequent Visitor

This is what it looks like filtered for 1 month. Se ehow the goal line is a sum of everone's goal instead of going up and down to show each person's specific goal?

mtp03_0-1663848281560.png

 

I want it to look like this, but keep in mind each month the goals change for each person. I tried doing a table for a single month's goals but then there is no historical data captured:

mtp03_1-1663848699646.png

 

 

 

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 

Exactly 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors