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
PoetryinMotion1
Regular Visitor

Figuring out a data model

Hi all,

Struggling with this one, although I might be overthinking it.
My data model has three tables listed below. I need to create a matrix with the following columns: 

a. Stage name

     a1. Sub-stage

b. Expected expense

c. Spent.

 

How can I ensure that all Stage Names are used, and when a row from the Fact Table such as the ones that have Stage 500 don't have a matching value in the Expected Expense table they will still show up in the matrix and vice versa? I'm thinking it would need to be a union of the Stage in tables 1 and 3 and duplicates removed.

 

Any ideas would be welcome.

 

1. Expected Expense:          

Project ID Stage    Sub StageExpected ExpenseStage Name
12345610016010000Phase 1
12345610018020000Phase 1
12345620021030000Phase 2
12345620023040000Phase 2
12345630031050000Phase 3
12345630032060000Phase 3
12345640041070000Phase 4
12345640042080000Phase 4

 

2. Stage and Sub-Stage master list:

 

StageSub Stage
100160
100180
200210
200230
300310
300320
400410
400420
500510
SUV100SUV110
SUV200SUV220

 

3. Fact Table:

SpentStageSub StageProject ID
3516100160123456
574100160123456
4108100160123456
539100180123456
122200230123456
1420200230123456
242200230123456
2652300310123456
2953300310123456
4015400410123456
4742400410123456
2535500510123456
4854500510123456
2656500510123456
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @PoetryinMotion1 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

vyiruanmsft_0-1685673315473.png

Best Regardsd

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

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @PoetryinMotion1 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

vyiruanmsft_0-1685673315473.png

Best Regardsd

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

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.