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
Sut_Datanaut
Helper II
Helper II

Complex modeling with 4 tables. need help!

Ok, so i have a rather large request that I have been mulling over for weeks. I have 4 central tables, along with other key tables (no need to get into these, but wanted to note it)

 

These 4 tables each have an account ID number, a date, and their own unique fields

1. one table has account volume and revenue

2. one table has account support desk calls

3. one table has survey responses 

4. one table has no date, but is used as a key for segmentation purposes

 

I would like to combine all of these tables, or atleast use them as outer links to a central table that i can then combine. the problem I am running into is that each table will have multiple rows for account number either for the date, for the application they use or origin of the support desk calls, so i end up getting a ton of singlular value expected errors.

 

Right now I am using the survey responses table as the main one that has many to many connections with the other tables (each table will have a different set of account ID numbers, but I am only looking for account ID's that are found on all 4 tables.

 

Sut_Datanaut_0-1696440599376.png

 

 

Any help would be appreciated

5 REPLIES 5
lbendlin
Super User
Super User

So far you don't have a data  model yet, just a bunch of tables somehow wired together.  In a data model you have dimension tables (stuff you filter by) and fact tables (stuff you calculate).  Dimensions control facts in a 1:* single direction relationship.  Can you identify the type of your tables?

Also, all 4 are fact tables, but i would like the category fields from each table to use across all tables. 

Power BI is the wrong tool for that. If you need an associative model, use Qlik.

 

In Power BI you will have the best success with a star schema data model.  Normalize your data so you have dimensions for Date, Account, Industry etc, and facts that describe actual transactions.

so lets say that I am trying to create a dims table based on the table below, where an account can be in multiple categories.

 

Do i need to pick the top 1 based on revenue, or should I pivot the industry column so that there is a unique column for each category? 

 

Account IDAccount IDAccount NameMonthIndustryrevenue
23242324acme 11/1/2023apparel232
23242324acme 12/1/2023warehousing2324
1311312324acme 13/1/2023warehousing2421
131342324acme 14/1/2023warehousing425
4321212324acme 15/1/2023warehousing43435
4321212324acme 16/1/2023electronics500
 32423acme 21/1/2023apparel232
 32423acme 22/1/2023apparel435
 32423acme 23/1/2023apparel3453
 32423acme 24/1/2023apparel231
 32423acme 25/1/2023apparel65
 32423acme 26/1/2023apparel321

Yeah, so i am lookingto build a star schema, the difficulty is that the dims tables have multiple distinct ID rows due to multiple categories they are in. So ACME, under ID number 2342 is present in 2 rows because they are in industry apparel and electronics.

 

So it would look like this, where I am obviously getting singluar value expected errors. There are associated revenues per each one of these categories, so do I have to do top 1 of each account id so there is only 1 row for each unique ID? 

 

Thanks,

 

Account IDAccount NameIndustry
2324acmeapparel
2324acmeelectronics
131131fredwarehousing
13134sarahapparel
432121jessicawarehousing
432121jessicaelectronics

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.