Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have 2 huge SQL queries on my power bi, both for different table, but the 2nd query partially matches the first query in one column "username" is there a way for me to merge both queries were I just use the column username from the 1st query and filterout all the rows that do no match from the 2nd query? I am not talking about replacing the existin 1st and 2nd query but create a 3rd query based on this
Solved! Go to Solution.
You can do it in two different ways by either merge as a new query and then filter or create a new SQL query with a left or right join where 2ndQuery.username is null. Basically, the merge is Power BI's join, so you tell it it's a left join on the usernames and then you can filter out the 2nd query's usernames to leave only blanks.
If your join column is something else (an order number, for example), then create a new column "Username" that will check if both values are identical. You can use it to filter.
And in SQL, instead of 2ndQuery.username is null, you would then use 1stQuery.username <> 2ndQuery.username
You can do it in two different ways by either merge as a new query and then filter or create a new SQL query with a left or right join where 2ndQuery.username is null. Basically, the merge is Power BI's join, so you tell it it's a left join on the usernames and then you can filter out the 2nd query's usernames to leave only blanks.
If your join column is something else (an order number, for example), then create a new column "Username" that will check if both values are identical. You can use it to filter.
And in SQL, instead of 2ndQuery.username is null, you would then use 1stQuery.username <> 2ndQuery.username
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
74 | |
57 | |
38 | |
33 |
User | Count |
---|---|
71 | |
65 | |
58 | |
50 | |
47 |