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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
quantumudit
Skilled Sharer
Skilled Sharer

Handling Bi-directional cross-filtering

Hello guys, Let’s say I have a simple model and I fully understand how bi-directional filtering works and I really need to optimize my model performance.

 

So, what is the best way, and why so?

 

The options are:

 

Opt-1: Enabling Bi-directional cross-filtering ?

Opt-2: Use CROSSFILTER() function instead ?

 

Notes: I do understand that bi-di are troublesome and we must avoid using it but, I just need to understand what is the best approach when we have a simple model.

So, this means my model is simple but, not the dataset, so it could have millions of rows and 20-30 columns.

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@quantumudit 

Personally I would avoid bi-directional filters at all costs (I've only used them for RLS security tables), and go for TREATAS ( I use this function very often) or CROSSFILTER





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
quantumudit
Skilled Sharer
Skilled Sharer

Thanks, @Pragati11 , @CNENFRNL  & @PaulDBrown  for your valuable inputs. 😊

Pragati11
Super User
Super User

Hi @quantumudit ,

 

I agree with @PaulDBrown. Use CROSSFILTER function.

Best practice is to avoid Bi-Directional relationships as they sometimes introduce complex joins between the tables and affect background performance a lot; specially when you are dealing with millions of rows in the dataset.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

PaulDBrown
Community Champion
Community Champion

@quantumudit 

Personally I would avoid bi-directional filters at all costs (I've only used them for RLS security tables), and go for TREATAS ( I use this function very often) or CROSSFILTER





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi, @quantumudit , in addition to PaulDBrown's advice on CROSSFILTER and TREATAS, I'd like to recommend Expanded Table as a third option. It's a more intrinsic way of filter propagation in DAX. Pls refer to this article by Italians.

https://www.sqlbi.com/articles/expanded-tables-in-dax/


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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