The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
There is probably a simple solution to this but I can't figure it out. In the simplified view of my data shown below I'd like to filter out all values of 2 and 3 in Column B, but only when the value in Column A is B. This is needed in the query editor.
Thank you!
Column A | Column B |
A | 1 |
A | 2 |
A | 3 |
B | 1 |
B | 2 |
B | 3 |
Solved! Go to Solution.
Hello @tgjones43
You can add a custom column using this code for your example then filter out the "remove" and finally delete the custom column.
if [Column A] = "B" and ([Column B] = 2 or [Column B] = 3) then "remove" else "keep"
You just need to filter the columns one by one.
Firstly filter Column A with value B.
Then filter Column B like below:
The result is as below:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @tgjones43
You can add a custom column using this code for your example then filter out the "remove" and finally delete the custom column.
if [Column A] = "B" and ([Column B] = 2 or [Column B] = 3) then "remove" else "keep"
If you need to create in query editor I would create a column that concats col a and b and then add a filter to exclude b2 and b3.
Hope that's enough for you, if you need more detail let me know and i can post more.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
94 | |
80 | |
63 | |
56 |
User | Count |
---|---|
248 | |
122 | |
110 | |
77 | |
70 |