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
krisstok
Frequent Visitor

Get all data from one table, not only matched in data model

Hi, 

I need help to get all data from one table not only matched.

 

Here is my data model. I got one table with revenue (Sales) and one table with budget (BudgetPM). They are joined by key like 202201PM PST1MN-LE (date YYYYMM, salesmanID, category of product).

dataModel.PNG

 

I want to show all budget compared to revenue like this:

 

chart.PNG

 

The issue is that budget for PST1 should be 17mln, but it shows me 16mln because there is no revenue for one category so I see only matched data from both tables.

 

Both tables do not have same number of columns.

3 REPLIES 3
tamerj1
Super User
Super User

Hi @krisstok 

it is all in the data model. Don't create relationships between fact tables. Date table can filter Sales and can filter BudgetPM directly. Same for VendorDict. 

@tamerj1 BudgetPM contains salesmanID, category and dateKey. I can't create relationship with calendar table only by dates, It would not match on salesman and category filters in sales table.

Also:

- sales is by date (year/month/day) / salesman / product category related to salesman

- budget is by year / months (no days) / salesman / product category related to salesman

 

VendorDict is a dimension table.

 

How should I create data model to work it well?

@krisstok 

I would creat common bridge dimension tables to connect them. I would avoid direct many to many relationships as much as possible. This won't be the only issue. Other broblems will start to appear the further you go with your analysis 

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.