Forum Discussion
How to filter a table?
Hello
The table I download from the source has some rows that I want to delete them.
To identify these rows, I will need to use criteria like [Column1]=*something_not_case_sensitive1* OR [Column2]=*something_not_case_sensitive2* etc.
What is the best strategy to achieve that? Do I need to duplicate the table and then work on it or I can work on the source table too?
Can you provide me the steps I need to achieve that? Please provide a comprehensive list of the steps as I am not familiar with PowerBI and there shouldn't be anything assumed as prior/common knowledge.
Thanks!
4 Replies
- AnonymousNot applicable
Hi.
I'll assume the rows in the source are there for a reason. Your download of the data into Power BI means you're working on a local copy. You'll want to remove rows from that local copy within Power BI. You'll need to make some statements in your data, to filter down the rows you want removed.
Without seeing your data, it's very difficult to give you a detailed list of actions to take.
Google is a generally good source for things...not knowing more specifics I would search for things like:
"Power Query Filtering undesired Rows"
you'll get the idea.
Or post your data table here and what you want filtered out and we can help.
- AnonymousNot applicable
Thanks, I cannot post the real data as it is confidential but you can use the table with the values below:
A1;B1;C1
A2;B2;C2
A3;B3;C3
A4;B4;C4
I want to remove the rows where in column B, the value equals *B2* or *B3* (case-insensitive with * being wildcards).
- AnonymousNot applicable
I'm not sure if you can filter a column directly with an insensitive case filter.
What you can do however is duplicate the column as all upper case and then filter on that
just input your desired text string into that filter as uppercase and you should be good to go.
- v-xicaiCommunity Support
Hi Anonymous ,
In Query editor, you may add a custom column to distinguish rows that you need to filter out. Then you can remove the "null" value rows via choosing the option "Remove Empty".
For example :
if [Date]="28-2-2019" and [Workitemid]=1 then null else 1Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.