cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThomasWeppler
Responsive Resident
Responsive Resident

Optiminizing filters in DAX

Hi power BI comunity

I want to optimize the filters in my Power BI report to make it fast to code in and make it all run faster for the end user.


Now I can write a filter in DAX like this

Registrationen[internalid] <> 3,
Registrationen[internalid] <> 5,
Registrationen[internalid] <> 13,
and it works fine.

But I think the preformance could be better if I just read throught the date once so I would like to write something like this.
Registrationen[internalid] <> {3,5,13}
But when I write this line of code it doesn't work.

Am I right to think that such a line would be faster?
Is there another way to write it that works in DAX?
1 ACCEPTED SOLUTION
NickolajJessen
Super User
Super User

here's a link to using NOT IN in Power BI Dax.
https://community.powerbi.com/t5/Desktop/DAX-equivalent-of-SQL-s-NOT-IN/m-p/586192#M277794

You can use Power Bi's built in Performance Analyzer to test various measure speed.

Does this solve your problem?

View solution in original post

1 REPLY 1
NickolajJessen
Super User
Super User

here's a link to using NOT IN in Power BI Dax.
https://community.powerbi.com/t5/Desktop/DAX-equivalent-of-SQL-s-NOT-IN/m-p/586192#M277794

You can use Power Bi's built in Performance Analyzer to test various measure speed.

Does this solve your problem?

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors