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
Anonymous
Not applicable

Best practice relationships when financial postings and budgets are on different levels

Hi, 

 

I would like some advice on how to set up the relationships when I have 

- Projects with 3 levels

- Budgets on the top levels

- Financial transactions on the lowest level

- Product grouping on Level 2

 

I would like tohave the ability to see the budget and transactions on top level, and also see budgets and transactions on products. 

 

Data looking like this:

 

Project numberLevel 2Level 3
A-531A-531.10A-531.10.10
A-531A-531.10A-531.10.10
A-531A-531.20A-531.20.10
A-531A-531.21A-531.21.10
A-531A-531.22A-531.22.10
A-531A-531.23A-531.23.10
A-531A-531.24A-531.24.10
A-532A-532.10A-532.10.10
A-532A-532.10A-532.10.10
A-532A-532.20A-532.20.10
A-532A-532.21A-532.21.10
A-532A-532.22A-532.22.10
A-532A-532.23A-532.23.10
A-532A-532.24A-532.24.10

 

Project numberBudget
A-5313000000
A-5326000000

 

UnderWBSDato
A-531.10.1001.05.2020
A-531.10.1001.02.2020
A-531.20.1001.02.2020
A-531.21.1001.02.2020
A-531.22.1030.03.2020
A-531.23.1030.03.2020
A-531.24.1030.03.2020
A-532.10.1001.02.2020
A-532.10.1001.02.2020
A-532.20.1001.05.2020
A-532.21.1001.02.2020
A-532.22.1001.03.2020
A-532.23.1030.03.2020
A-532.24.1001.02.2020
A-531.22.1001.04.2020
A-531.23.1001.02.2020
A-531.24.1001.02.2020
A-532.10.1001.05.2020
A-532.10.1001.02.2020
A-532.20.1028.04.2020
A-532.21.1001.04.2020
A-532.22.1001.02.2020

 

Level 2Product
A-531.10Vegetables
A-531.20Other
A-531.21Fruit
A-531.22Fruit
A-531.23Fruit
A-531.24Fruit
A-532.10Vegetables
A-532.20Other
A-532.21Fruit
A-532.22Fruit
A-532.23Fruit
A-532.24Fruit
1 ACCEPTED SOLUTION
DebbieE
Community Champion
Community Champion

Hi,

 

Ill have a go at this one too

 

STAR For forum.JPG

there should be a date table

I would add a Surrogate ket to all the description tables (Your dimensions)

So 1,2,3 etc

So lets take one example

Key

 

 

Project number

Level 2

Level 3

1

 

 

A-531

A-531.10

A-531.10.10

2

 

 

A-531

A-531.10

A-531.10.10

3

 

 

A-531

A-531.20

A-531.20.10

4

 

 

A-531

A-531.21

A-531.21.10

5

 

 

A-531

A-531.22

A-531.22.10

6

 

 

A-531

A-531.23

A-531.23.10

7

 

 

A-531

A-531.24

A-531.24.10

 

Project A-531 has 7 rows of data. However 1 and two are confusing because the IDs appear to be identical so you would have issues with this. Every 3 levels should be unique

Key

 

Project number

Budget

1

 

A-531

3000000

 

 

 

 

 

 

And the top level project  connects  to a budget

Key

 

Level 2

Product

1

 

A-531.10

Vegetables

2

 

A-531.20

Other

3

 

A-531.21

Fruit

4

 

A-531.22

Fruit

5

 

A-531.23

Fruit

6

 

A-531.24

Fruit

 

And your 2nd level project seems to connect to the 6 products

 

And finally a date table connecting to a date ID rather than a date

DateKey         Date                     Month     Year

20200501      01.05.2020    May        2020

 

 

And your Fact table connects up to your lowest level level project so Im just going to choose 1 level

You can merge your Surrogate keys into the fact table to use them as a join in the model

 

Project Key

Budget Key

Product Key

UnderWBS

Date Key

Date

Metric

3

1

2

A-531.20.10

20200501     

01.05.2020

300

 

And what you are looking for is single joins to your fact table so your descritive info can fiter your metrics. Like Give me sales by product.

I think its 1 on your dimension to the many to your fact table

So I always just write myself a little sentence to say for example

Many projects can be on the same date

Im not too sure on your business logic but it always helps me

View solution in original post

2 REPLIES 2
DebbieE
Community Champion
Community Champion

Hi,

 

Ill have a go at this one too

 

STAR For forum.JPG

there should be a date table

I would add a Surrogate ket to all the description tables (Your dimensions)

So 1,2,3 etc

So lets take one example

Key

 

 

Project number

Level 2

Level 3

1

 

 

A-531

A-531.10

A-531.10.10

2

 

 

A-531

A-531.10

A-531.10.10

3

 

 

A-531

A-531.20

A-531.20.10

4

 

 

A-531

A-531.21

A-531.21.10

5

 

 

A-531

A-531.22

A-531.22.10

6

 

 

A-531

A-531.23

A-531.23.10

7

 

 

A-531

A-531.24

A-531.24.10

 

Project A-531 has 7 rows of data. However 1 and two are confusing because the IDs appear to be identical so you would have issues with this. Every 3 levels should be unique

Key

 

Project number

Budget

1

 

A-531

3000000

 

 

 

 

 

 

And the top level project  connects  to a budget

Key

 

Level 2

Product

1

 

A-531.10

Vegetables

2

 

A-531.20

Other

3

 

A-531.21

Fruit

4

 

A-531.22

Fruit

5

 

A-531.23

Fruit

6

 

A-531.24

Fruit

 

And your 2nd level project seems to connect to the 6 products

 

And finally a date table connecting to a date ID rather than a date

DateKey         Date                     Month     Year

20200501      01.05.2020    May        2020

 

 

And your Fact table connects up to your lowest level level project so Im just going to choose 1 level

You can merge your Surrogate keys into the fact table to use them as a join in the model

 

Project Key

Budget Key

Product Key

UnderWBS

Date Key

Date

Metric

3

1

2

A-531.20.10

20200501     

01.05.2020

300

 

And what you are looking for is single joins to your fact table so your descritive info can fiter your metrics. Like Give me sales by product.

I think its 1 on your dimension to the many to your fact table

So I always just write myself a little sentence to say for example

Many projects can be on the same date

Im not too sure on your business logic but it always helps me

MFelix
Super User
Super User

Hi @Anonymous ,

 

I would create a dimension table for:

  • Level 2
  • Level 3
  • Dates

 

Then relate the tables with the Projects tables and the products and financials, that should give you the needed relationship to have everything working, but you can have to make some specific measures depending on the way you are picking up the values.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.