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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
akarkal
Frequent Visitor

Handling High Cardinality Text Hierarchy

I am new to modelling fact tables and wanted to reach to figure if high cardinality string columns should be moved to a dimension table ?

 

I have a fact table which basically boils down to 

 

  1. Type
  2. Type1
  3. Type2
  4. Type3
  5. Amt
  6. Other Columns..

 

---

  1. Type / Type 1 / Type 2 / Type 3 for an Heirarchy. and they have high cardinality.
  2. These columns are used in reports where you make a grid of them and the user navigates through the heirarchy
  3. Would it be advisb

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @akarkal 

 

If you want to move Type / Type 1 / Type 2 / Type 3 columns to a dimension table, you can create a dimension table in Power Query editor. Duplicate the original query to get a new query. In the new query, select these four Type columns and remove other columns. Then also select these four columns and remove duplicated rows (Remove Duplicates feature). Then you will have a dimension table. 

 

As this table is disconnected from the fact table, if you want to use it to filter the fact table, you need to create a relationship between them. An option is to create a key column in both tables which combines values in four Type columns and create a relationship on these key columns. You can also create relationships on other columns per your need.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @akarkal 

 

If you want to move Type / Type 1 / Type 2 / Type 3 columns to a dimension table, you can create a dimension table in Power Query editor. Duplicate the original query to get a new query. In the new query, select these four Type columns and remove other columns. Then also select these four columns and remove duplicated rows (Remove Duplicates feature). Then you will have a dimension table. 

 

As this table is disconnected from the fact table, if you want to use it to filter the fact table, you need to create a relationship between them. An option is to create a key column in both tables which combines values in four Type columns and create a relationship on these key columns. You can also create relationships on other columns per your need.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

lbendlin
Super User
Super User

Define what you mean by "high" .  While you generally want to keep the cardinality low for dimension table you can still have good performance with tens of thousands of rows. With millions of rows - not so much.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors