Forum Discussion
Anonymous
5 years agoNot applicable
ALLNOTSELECTED with EXCEPT but not using FILTER Function
Hi all, I have a two part question. I am trying to write an ALLNOTSELECTED schema as mentioned below. Opposite of ALLSELECTED? (ALLNOTSELECTED) For some reason, the function does not wor...
OwenAuger
5 years agoSuper User
Hi Anonymous
Thanks for posting your PBIX - it made it easy to confirm the logic you want to apply 🙂
I would suggest writing something like this:
Early Pct Not this Driver EXCEPT ALL VALUES =
CALCULATE (
[Early Pct],
EXCEPT ( ALL ( Trips[driver_id] ), VALUES ( Trips[driver_id] ) )
)
I did some performance comparisons with your existing measures (after increasing the size of your table by 1000 times) and this does appear to outperform the others using FILTER.
This is pretty similar to your measure Early Pct Not this Driver with FILTER FUNCTION 2 but uses VALUES rather than a FILTER expression to access the list of visible driver_id values, so it would also handle cases of multiple selection of driver_id.
Would this work for you?
Regards,
Owen