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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SLama
Frequent Visitor

How should I structure data if I want to data as drill down

Hello all, 

I have with data structure that looks like this where we have fac_id is within area_id and area_id is within dist_id. Can you can see dist_score is duplicated while area_score has some duplicates and fac_score has all distinct data for each fac_id. Should I split the table into 3 tables? How would you structre it properly so when I go to area_score or disct_id, I get it's data isntead of getting sums. 

 

Thanks in advance.

 

SLama_0-1724252414166.png

 

1 ACCEPTED SOLUTION
v-jialongy-msft
Community Support
Community Support

Hi @SLama 

To structure your data for drill-down analysis, splitting the table into three related tables is a good approach. This will help you avoid redundancy and make it easier to query specific scores at different levels. Here’s how you can structure it:

District Table

DIST_ID DIST_SCOR
1 0.7
2 0.9
5 0.88
6 0.2

 

Area Table

AREA_ID DIST_ID AREA_SCOR
1 1 0.1
2 1 0.6
3 5 0.22
5 5 0.35
6 6 0.6

 

Facility Table

FAC_ID AREA_ID FAC_SCOR
1 1 0.1
2 1 0.2
3 1 0.3
4 1 0.3
5 1 0.5
6 1 0.6
7 1 0.23
8 2 0.22
9 2 0.23
10 2 0.5
1 3 0.12
2 3 0.2
3 3 0.33
4 3 0.3
5 3 0.55
6 3 0.66
7 3 0.23
8 6 0.22
9 6 0.23
10 6 0.5









 

Best Regards,

Jayleny

 

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-jialongy-msft
Community Support
Community Support

Hi @SLama 

To structure your data for drill-down analysis, splitting the table into three related tables is a good approach. This will help you avoid redundancy and make it easier to query specific scores at different levels. Here’s how you can structure it:

District Table

DIST_ID DIST_SCOR
1 0.7
2 0.9
5 0.88
6 0.2

 

Area Table

AREA_ID DIST_ID AREA_SCOR
1 1 0.1
2 1 0.6
3 5 0.22
5 5 0.35
6 6 0.6

 

Facility Table

FAC_ID AREA_ID FAC_SCOR
1 1 0.1
2 1 0.2
3 1 0.3
4 1 0.3
5 1 0.5
6 1 0.6
7 1 0.23
8 2 0.22
9 2 0.23
10 2 0.5
1 3 0.12
2 3 0.2
3 3 0.33
4 3 0.3
5 3 0.55
6 3 0.66
7 3 0.23
8 6 0.22
9 6 0.23
10 6 0.5









 

Best Regards,

Jayleny

 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.