How to simplify an in {} statement in DAX

i was wondering if the attached screenshot can be written in a easier and perhaps a more efficient way in terms of performance.
maybe {X010 … X900}
or xclude some X*** from the list

thanks in advance

Hi @Roger

Not sure about in DAX, however you could create a custom column in PowerQuery flagging the records you want to include as 1 and rest as 0 and use this column in your DAX. In PowerQuery you’d be able to look for X*** etc. as you’ve mentioned.

Hi @Roger - Using DAX you can try creating separate Table with single column with " X" values to be included in the IF statement. Once done, can write a query like below. Here Table 2 is the new table with X values.

Filter(‘Table’,‘Table’[Column1] in values(‘Table (2)’[Column1]))

Thanks
Ankit J

2 Likes

Ankit

Thanks for the solution

Roger