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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SivaMani
Resident Rockstar
Resident Rockstar

Filter Fact table based on Dim table

Hello All,

 

I have the following tables,

  • Dim_PRD - Applied few filters in Query Editor
  • Fact_Finance - Create a relationship between Dim and Fact

The requirement is,

 

I need to filter the Fact table based products which are available in Dim. For example, I filter 5 products in Dim. I would like to have only those 5 products in Fact.

 

Is there any option to do this without having a calculated table?

 

Thanks,

Siva

 

1 ACCEPTED SOLUTION

@v-frfei-msft

 

Thanks for the response.

 

It works if we have a relationship between the tables and firing a query to apply the filter explicitly by adding the filter in Report. 

 

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @SivaMani,

 

I made one sample for your reference.

 

1. Create a measure as below and filter the fact table by the measure. make the measure is 1.

 

Measure = IF(MAX('fact'[product]) in VALUES(Dim[product]),1,0)

Capture.PNG

 

For more details, please check the pbix as attaced.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft

 

Thanks for the response.

 

It works if we have a relationship between the tables and firing a query to apply the filter explicitly by adding the filter in Report. 

 

PattemManohar
Community Champion
Community Champion

@SivaMani You mean, you want to filter the Fact table data when you use them in the visuals (as per the products available in Dim table). Could you please post a sample data before suggesting you something.





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

Proud to be a PBI Community Champion




Thanks for the reply @PattemManohar,

 

Yes. You're right. In my case, I'm not using any field in the visual. 

 

I have a solution that merging to tables. It is costly in my case. So looking for a better way to do this.

 

I can't post any data here. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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