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
Bimtng
Frequent Visitor

Bring just the needed dimension data to my document

Hi all.

 

I have a dimension that has a great number of rows. My model has a table of facts that does not need all the rows in the dimension table. The question is: How can I bring to my model just the relationed rows between both tables? I take all the facts, however I would like to bring just the dimension rows connected with the facts, not all of them as I do now.

 

Thanks in advance.

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Bimtng

 

What you could do, is in your SQL Query, you could write the TSQL for your Dimension table that it only brings the Dimension ID's where they exist in your Fact Table

 

EG:

 

 

Select * 
from DimensionTable
where DimensionID in
   (
     Select Distinct DimensionID
     from FactTable
  )

That result will be your Dimension table will only bring in the related DimensionID from your Fact table.

 

 





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

Proud to be a Super User!







Power BI Blog

View solution in original post

4 REPLIES 4
GilbertQ
Super User
Super User

Hi @Bimtng

 

What you could do, is in your SQL Query, you could write the TSQL for your Dimension table that it only brings the Dimension ID's where they exist in your Fact Table

 

EG:

 

 

Select * 
from DimensionTable
where DimensionID in
   (
     Select Distinct DimensionID
     from FactTable
  )

That result will be your Dimension table will only bring in the related DimensionID from your Fact table.

 

 





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

Proud to be a Super User!







Power BI Blog

dkay84_PowerBI
Microsoft Employee
Microsoft Employee

Are you using Direct Query or Import for your data?

I do not know if I have understood your question. Both tables are in a SQL Server database.

When you connected to the SQL database, did you choose to import or do direct query?

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