Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a visual that I need to filter it based on a list of values.
for example a line chart that will calculate all the customer IDs but not the IDs that are coming from a specific list. I tried to add the ID column to the filters pane and using the advanced filter select ( is not ) and picked the ID but the problem is that I have about 20 ID and some of them are not in the table yet.
So how can I approach this?
Solved! Go to Solution.
@SamOvermars What do you mean 'some of them are not in the table yet'? Not sure how to filter for NOT ID if it's not there yet, but I think you might find a Left Anti merge to be helpful, if you don't mind the filter being applied at power Query level?
If you have a list of all the IDs you don't want in a table, and you have the Customer table, then in Power Query you can start with the Customer table, Merge Queries > select Customer ID columns in both tables. Then choose Left Anti for your Join kind. That will remove any Customer ID that was in the Second table list, and keep all other customer IDs that were not in that second list.
When you create your visuals, just filter to remove Blank Customer ID, as those will be related to the customers you filtered out in Power Query.
Does that make sense hopefully?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @SamOvermars
Hope you are doing well.
Have you solved this question? Can we close this thread now if there is no other question? It would be nice if you can accpet my answer as the solution. Thanks 🙂
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Hi @SamOvermars
Thanks for reaching out to us.
Is the visual you are looking for? https://blog.pragmaticworks.com/power-bi-custom-visuals-filter-by-list
FYI:
https://community.powerbi.com/t5/Desktop/Filter-by-List-by-Dev-Scope-is-gone/td-p/1164066
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@SamOvermars What do you mean 'some of them are not in the table yet'? Not sure how to filter for NOT ID if it's not there yet, but I think you might find a Left Anti merge to be helpful, if you don't mind the filter being applied at power Query level?
If you have a list of all the IDs you don't want in a table, and you have the Customer table, then in Power Query you can start with the Customer table, Merge Queries > select Customer ID columns in both tables. Then choose Left Anti for your Join kind. That will remove any Customer ID that was in the Second table list, and keep all other customer IDs that were not in that second list.
When you create your visuals, just filter to remove Blank Customer ID, as those will be related to the customers you filtered out in Power Query.
Does that make sense hopefully?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |