Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear community,
I'm trying to figure out how to exclude the rows for a specific ID, in a column of a Join table.
The table has this code:
I need help to remove from UDM_DMO_SPOT_VALOR table, "ID Spot",UDM_DMO_SPOT_VALOR[ID_SPOT], the ID=30 (i.e. UDM_DMO_SPOT_VALOR[ID_SPOT]<>30).
Any tip on this?
Thanks in advance.
Regards
Solved! Go to Solution.
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
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
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
@dedelman_clng Yes, you're right. I have reordered the code and it worked.
Thanks for your tips!
Cheers!
@dedelman_clng thanks for your tip, first of all. I've tried this one (in blue):
Thanks @dedelman_clng! It worked. I tryied Filter function before, but it was not properly written in the DAX code.
Cheers!
Hi @dedelman_clng! Hope you're fine.
One more question if you can help:
Instead of one ID that I need to filter, I need 2 or more ID to be out of the table, what do you think will be the best option?
I've tryed NOT [ID_FW] {xx,yy,zz}, but it didn't work.
Any tip on this?
Thanks in advance
Regards
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
13 | |
12 | |
8 | |
7 |
User | Count |
---|---|
18 | |
14 | |
11 | |
11 | |
9 |