Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I have a problem with filtering certain rows.
I would like to filter out from all of my data rows, which firstly in column "Category" are "Candies" and column "Accounts" are anything else but "123" and "345". So I would like to exclude from my data all the other Candies accounts beside "123" and 345". This Candies filtering is important as I have like hundred other category as well.
Best regards,
Kelly
Hi,
Have you tried applying these conditions in the Query Editor? If yes, then what problem do you face?
Hi!
Yes, I tried to filter it in query editor, but then it filtered all the "Candies" out and did not left any candies to the data. And advcanced filtering does not allow me to create a condition "anything else but "123""?
Hi,
Share some data to work with and also show your expected result.
I created an example to excel:
And result should be like this:
All the other candies with accounts, which are not 123 and 345, are gone.
Does this help?
Hi,
Why are 879 and 478 appearing there? I just do not understand your filtering conditions.
Hi,
It is hard to make an example table to you, I cannot present the real data. But these are just for example that you could understand that I have not got only candies with accounts, but other things as pies with the same accounts as well. So actually I need that all the other data would remain the same and Candies would appear only with accounts 123 and 345. Does it make more sense? 🙂
Is there anyone, who could help?
Hi @KellyLen,
In the power query add this column to your data:
if [Category] <> "Candies" then "keep" else if ([Category] = "Candies" and [Accounts] = 123 ) or ([Category] = "Candies" and [Accounts] = 658 ) then "keep" else ""
Then just do a filter on keep and delete the column you just created:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSuper! It worked, if I added "" to the accounts as well. 🙂
Thank you very much!
Best regards,
Kelly
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |