Forum Discussion
Remove rows from a Join Table
- 5 years ago
Hi Anonymous - you can use FILTER on the output of SELECTCOLUMNS to remove rows prior to the UNION happening.
FILTER ( SELECTCOLUMNS (...), [Filter Condition] )
You could also potentially use FILTER inside SELECTCOLUMNS by first filtering the base table, then choosing the columns
SELECTCOLUMNS ( FILTER ( [Table], [Filter Condition] ), ... )
Hope this helps
David
- 5 years ago
FILTER( TableName, NOT(TableName[ID_FW] IN {"xx", "yy", "zz"} ) )
should work (obviously if the IDs are numbers, don't need the quotes). If it isn't please share your error message or what behavior you are seeing.
Hope this helps,
David
Hi Anonymous - please reread my initial response to your post. You are not following the pattern I suggested. See https://dax.guide/filter/ , https://dax.guide/selectcolumns/ and https://dax.guide/union/ for proper syntax.
You should also use a tool like https://www.daxformatter.com/ to make your code readable. It will also tell you if your code has a syntax error (though it won't necessarily tell you what the error is). I can't get your code as written to compile on daxformatter so there are issues with it that need to be resolved.
Hope this helps
David