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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
MVenables
Advocate II
Advocate II

Filter down Data in a Fact table Power Query

Hi all,

 

I need some help/suggestions please.

 

I have a fact table called Customer Invoice (Which is Imported), but i don't want to load in all the sales data as its not needeed.

 

I only want to see Data that is contained in my Dimensions table 'StarCustomer'[CustomerCode] (as i have slimmed down the data just to see sales from new customers). My Customer Invoice table does have [CustomerCode] as a column. I have tried an inner merge but it just fails or won't load. Is there a way of using parameters as i do with RangeStart & RangeEnd as i have an imcremental refresh setup on this model. 

Or any other method i could try. Any help is much appreciated as i need a method i can use for the future when slimming down data that i don't need from a fact table.

 

Thank you,

 

Michael

1 ACCEPTED SOLUTION
shafiz_p
Super User
Super User

Hi @MVenables  Inner join should work. However, You could also try left outer join, expand only customer code and then filter out null values.

 

Also, you could create a list of customer code from customer table and based on that list filter fact table. 


Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

3 REPLIES 3
v-pagayam-msft
Community Support
Community Support

Hi @MVenables ,
Thank you @techies  and @shafiz_p  for the helpful repsonses.

May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

Thank you for being a valued member of the Microsoft Fabric Community Forum!

techies
Resolver III
Resolver III

Hi @MVenables using M code 

 

= Table.SelectRows(CustomerInvoice, each List.Contains(StarCustomer[CustomerCode], [CustomerCode]))

shafiz_p
Super User
Super User

Hi @MVenables  Inner join should work. However, You could also try left outer join, expand only customer code and then filter out null values.

 

Also, you could create a list of customer code from customer table and based on that list filter fact table. 


Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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