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

use dax to create dimensions

I'm working on a dimensional model based off a single query which does all the joins so I have a my single table with both dimensions and facts.  I realize there are few ways to do this

1. Pull facts and dimensions from the backend but this would require several pulls and would prefer to process tables only once - which is what I have now.

2. Current solution we're using power query  The dimensions have surrogate keys which I create with SQL DENSE_RANK so all I do with PQuery is extract the columns (via duplicate) group them to get down to distinct rows and delete the non-key columns in the main table.  Works nice but it creates several dependencies and I have not found a way to refresh where the dependencies are recreated.  I thought pquery would just run all the steps again.

3. Use DAX which I have no idea where or how or what functions to use.  When I google "create dimensions with dax" I get mostly links on creating a master calendar.

 

Any help would be of great assistance.  TH

 

Anyone have a link or example of creating dimensions with DAX ? 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You will not be able to delete the columns used for creating dimension tables.

 

Alternately you can create a new fact table using  SELECTCOLUMNS(Table,Name1,Col1,Name2,Col2....).

 

In this approach you will have both the original fact table and the extracted fact table. An over kill.

 

If your intention is users should not see the dropped columns, you can hide them from the Fields pane of the fact table.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
CheenuSing
Community Champion
Community Champion

Hi @Anonymous ,

 

Have you tried creating dimesnions tables using SUMMARIZE function ?

 

After you load the fact table, you can try to create dimension tables using the above function.

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

So that didn't work.  I could not drop the fields from the main table after creating the dimensions.  Apparently these tables are virtual.  Is there a function that will extract the fields I need ?

Hi @Anonymous ,

 

You will not be able to delete the columns used for creating dimension tables.

 

Alternately you can create a new fact table using  SELECTCOLUMNS(Table,Name1,Col1,Name2,Col2....).

 

In this approach you will have both the original fact table and the extracted fact table. An over kill.

 

If your intention is users should not see the dropped columns, you can hide them from the Fields pane of the fact table.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

interesting idea.  I'll try it out.  thanks

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