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
11097486
Helper I
Helper I

Many to many relationship + Power Query Filter

Hello, when I create a many to many relationship with 3 tables, I have a problem when I add a filter in power query.

 

Relationship

11097486_1-1609964247532.png

 

Result 1 without a filter in power query: Everything is normal

11097486_2-1609964268050.png

 

Result 2 with a date filter (after 2018) in power query: A blank row appears.

11097486_3-1609964455298.png

 

I do not understand de logic or the reason why the blank row appears. Any idea?

 

Thank you

 

 

 

 

1 ACCEPTED SOLUTION

Hello, yes I know that I can filter directly with a slicer. I was just wondering if it is possible to filter directly in PQ to avoid loading millions of lines. However, it seems like filtering in PQ only applies to one table and not to the other tables linked to it. Thank you for your help!

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@11097486 what you mean by the filter in PQ? It shows blank coz value doesn't exist in the operational table and probably there are transactions in operations products.

 

Also why you have a cross filter to both between products and operational products table

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hello, 

 

1) I have a cross-filter because I want to be able to see the product codes linked to the operation codes.

11097486_1-1610031595337.png

 

2) I filter in PQ beaucoup I have millions of operation and I don't need to upload data from 2015 when I refresh my report.

Here's a simpler example. I removed 2020-01-01 with a filter in PQ. I just don't understand why it turns to Blank in the matrix. It souldn't since there is no blank dates in PQ, no?

 

 

11097486_0-1610031444545.png

 

Thank you

Hi, @11097486 

 

It’s my pleasure to answer for you.

According to your description, Even if you filter 2020/1/1 of Table 1 in PQ, but the 'operation id' corresponding to the date of 2020/1/1 in Table 2 is still there, then Table 3 will generate three values of AA, BB, and DD according to the filtering relationship, So there is a value even if it is blank.

Like this:3.png

You can directly use a date slicer or filter date in filter pane.

Like this:

4.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, yes I know that I can filter directly with a slicer. I was just wondering if it is possible to filter directly in PQ to avoid loading millions of lines. However, it seems like filtering in PQ only applies to one table and not to the other tables linked to it. Thank you for your help!

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.