Forum Discussion
Faster method for double boolean on filter?
DouweMeer Try using
MINX(
FILTER(
'source file',
'source file'[country] = 'fact'[country] &&
('source file'[postal code] = "all" || 'source file'[postal code] = 'fact'[postal])
),
'source file'[value]
)
This approach uses a logical OR (||) to check if the postal code is "all" or matches the postal code in the fact table, which should be more efficient than using an IF statement inside the filter.
My postal check isn't as easy as I made it seem. It is like:
left ( 'fact'[postal] , len ( 'source'[postal] ) ) = 'source'[postal]
Was thinking of not having it verify the postal when the source file's info is all.
Whilst writing this, I came up with another question:
https://community.fabric.microsoft.com/t5/Desktop/Order-in-which-filter-works/m-p/4405425#M1371776
Would you know that question's answer?
Is it faster to check on both at the same time instead of my prior of if ( equal all , true , otherwise ) ?