1

First off I realize that narrow fact tables are the ideal situation.

I am designing a healthcare data warehouse specifically for ingestion into Power BI. The problem I'm having is that I have over 100 different metrics that are included in just one report. Most of the data comes from the source like this:

Hospital HospitalID Date Description Number
Children's Hospital 20192 1/2/2021 Beds Needed 8
Children's Hospital 20192 1/2/2021 Covid Patients 2

We currently use logic to pull each metric out like this in PowerBI:

Beds Needed=IF(Description="Beds Needed", Number,0)

We do this for over 100 metrics that are needed according to business leaders. My question is, there are two ways Im thinking of doing this:

Option 1:

We put the logic like above into the database and have every metric be it's own column.

Date Hospitalid Beds Needed Covid Patients
1/2/2021 20192 8 2

Option 2:

I setup the fact table like so:

Date HospitalID Descriptionid Number
1/2/2021 20192 12 8
1/2/2021 20192 11 2

And then create a dimension table like so:

Description DescriptionID
Beds Needed 12
Covid Patients 11

The tables that I have currently (in the format of the first table) each are around 200k rows and there are 4 of them. There is one table that supplies metrics that is around 20 million rows.

4
  • Yeah I read that too, but given that my data has around 120-150 facts I'm not sure if it qualifies for using measure type dimensions or not.
    – haredev
    Commented Jun 2, 2021 at 18:35
  • what problem are you really trying to solve? what's the issue with having many fact columns?
    – RADO
    Commented Jun 2, 2021 at 18:48
  • @RADO For the 4 tables that are 400-600k rows each there's no issue with having many fact columns. The issue I'm worried about now is that if the "big table" that has 20 million rows gets loaded, it will take us over the import time allotted (20 min). Also want to make sure that report performance is adequate.
    – haredev
    Commented Jun 2, 2021 at 18:53

1 Answer 1

-1

Option 2 is the cleaner version. A large fact table will store numbers better than text.

For the 20mm row fact table you could use incremental refresh to pull it in.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Apr 25, 2023 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.