March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I need to remove specific, nonconsecutive rows within my dataset in Power BI. For example, I have 5 different locations (1-5) and 5 different products (A-E). I need to filter out Location 1, Product B, and Location 3, Product D. When I try to do this in the data query, it seems to remove either all products for location 1 or the specific product for all locations. When I try to use the remove rows feature, it only allows me to remove from the top or bottom, and the rows must be consecutive. I cannot seem to remove very specific rows. Please help! My data is confidential, but below is a sample with the highlighted rows as the rows I need removed from my dataset in Power BI. Thank you!!
Marie
Solved! Go to Solution.
@Anonymous - Create a column that concatenates your two columns. You may have to do a type conversion for your numeric column,
Text.From([Location]) & [Product]
Then you can remove just the rows you want.
@Anonymous , refer
https://www.quora.com/In-Power-Query-can-I-remove-rows-based-on-a-particular-value-in-a-column
Add a custom column like this to get more specific
if [Location] = "Location 1" and [Product] = "Product B" then 1 else 0
Then you can just filter out the rows with 1 in the new column.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous - Create a column that concatenates your two columns. You may have to do a type conversion for your numeric column,
Text.From([Location]) & [Product]
Then you can remove just the rows you want.
insert palm to face for not thinking about this. Thank you!!!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |