Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Nahel88
Frequent Visitor

Copy Query

I have the following example of my data :

Col1        Col2                                                        Col3        Col4

s               1                                                               s             1

q              2                                                               q             2 

d                                                                                f             3

f               3                                                                h            4 

g

h              4 

j

 

 and i want to get only the rows that both Col1 and Col2 are existin other words Col3 and Col4. I need the Query to get such a result sorry im not that good in writing queries but im in need to get this one. 

 

1 ACCEPTED SOLUTION
Baskar
Resident Rockstar
Resident Rockstar

Hi buddy,

I will give you two ways
1. from Query editor.
Original TableOriginal Table









Using Filter to remove NullUsing Filter to remove NullModelling TableModelling Table


2. From Development Canvas

Table ViewTable ViewRemove the check mark inRemove the check mark inOr else Choose in filter "is not Blank"Or else Choose in filter "is not Blank"

View solution in original post

8 REPLIES 8
Baskar
Resident Rockstar
Resident Rockstar

Hi buddy,

I will give you two ways
1. from Query editor.
Original TableOriginal Table









Using Filter to remove NullUsing Filter to remove NullModelling TableModelling Table


2. From Development Canvas

Table ViewTable ViewRemove the check mark inRemove the check mark inOr else Choose in filter "is not Blank"Or else Choose in filter "is not Blank"

carinat
Advocate II
Advocate II

Do you want to keep col 1 and 2 or could you simply just filter out blank values in both columns?

I think Nahel wants to remove blanks values from columns 1 and 2 in order to obtain something similat columns 3 and 4.

 

Create your table with columns 1 and 2, under Filters (right pane), expand column 2 and select is not blank, apply the filtering and this should remove all blank values.

wonga
Continued Contributor
Continued Contributor

@Nahel88

 

Assuming columns 1 and 2 are one table and columns 3 and 4 are another table:

 

You can probably use the "Merge Queries" feature in Query Editor and select the common column between the two tables and the result will be only what's common between the two.

 

If my assumption is incorrect, please provide more context/information as to what you want to achieve.

Nahel88
Frequent Visitor

ya but merge only works with mached type columns and those are two different types so , i dont think thats ganna work 


@Nahel88 wrote:

ya but merge only works with mached type columns and those are two different types so , i dont think thats ganna work 


@Nahel88

 

According to the snapshots in your original post, I think you can conform the columns to same consitent data types. Afterwards, merge the queries.

Capture.PNG

Baskar
Resident Rockstar
Resident Rockstar

Hi Nahel let me know , what is the output u excpecting ?

the Col3 and Col4 so a 2 new Columns 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.