Forum Discussion
How to filter the non-matched values?
Hello
In the pbix below, I have a slicer to filter a table visual however, I cannot filter the lines where the ColB2 is blank.
Any idea?
Thanks!
Hello @UsePowerBI ,
This is because you have created many-to-many relationships in the sample file. In this relationship, the field value 1,2,3,4 in ColA1 has no corresponding value in ColB1 so that it is not filtered when you use ColB2 as the slicer.
You can create a bridge table that includes the ColA1 and ColB1 values and establish a relationship with the other two tables respectively to avoid the many-to-many relationship, set the visual filter of the table visual, because ColA1 is not blank, you can now use ColB2 segmentation to filter the blank value normally :
Attached the modified sample file in the next one, hopes to help you.
Best Looks,
Yingjie LiIf this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
5 Replies
- Greg_DecklerCommunity Champion
Anonymous I have seen people use Append query in Power Query or UNION in DAX to add a blank row to their table so that they have a match?
- PaulDBrownCommunity Champion
Anonymous
Seeing both tables have the same structure, you should append them (preferebaly in Power Query) to create a single table with the three columns.
You can then create dimension tables to do your slicers/filtering/filter expressions etc...
I've attached the PBIX file for your reference
- v-yingjlCommunity Support
Hello @UsePowerBI ,
This is because you have created many-to-many relationships in the sample file. In this relationship, the field value 1,2,3,4 in ColA1 has no corresponding value in ColB1 so that it is not filtered when you use ColB2 as the slicer.
You can create a bridge table that includes the ColA1 and ColB1 values and establish a relationship with the other two tables respectively to avoid the many-to-many relationship, set the visual filter of the table visual, because ColA1 is not blank, you can now use ColB2 segmentation to filter the blank value normally :
Attached the modified sample file in the next one, hopes to help you.
Best Looks,
Yingjie LiIf this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
v-yingjl thanks, can you please repost the pbix after fixing the error: Object Reference not set to an instance of an object
I cannot open the pbix.
Or you can paste here the code to create the bridge table please?
- v-yingjlCommunity Support
Hi Anonymous ,
Sorry for replying late. Maybe the version of power bi desktop is not matched. Perhaps you can use the latest version of power bi desktop to try to open it.
In addition, the bridge table in this case is created manually( just enter data ).
Or you can create this bridge table by this formula:
Table = GENERATESERIES(1,12,1)Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.