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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NittanyBlu
New Member

Delete/Remove rows of data where no relationship exists, resulting in null record

I've merged two tables together, as a result of the merge some records have come back as null... which is expected. Given one of my tables has >1,000,000 rows of data, I would like to delete/remove all rows from my newly merged table where null is found. I'm sure this is really simple... for the life of me I can't find how to do it Thanks in advance

 

In the example found below... I would like any line item listed as null within the Assignment Code column to be completedly removed from table. 

 

Newly merged table

Account # Assignment Code
1234A001
2345A001
4567null
6789A002
8764null
9534A003

 

Table would look like this after removal of null line items

Account # Assignment Code
1234A001
2345A001
6789A002
9534A003
1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@NittanyBlu 

 

If you want to do it using Power Query:

Go to Power Query Editor (Home --> Transform Data --> Transform Data)

Click on the table and find the column with the nulls

Click on the drop down arrow button and untick null.

 

Image below

notnull.jpg

 

Using DAX formula you can use something like the following:

NEW Table =
DISTINCT (
    FILTER (
        UNION (
            Table 1,
			Table 2,
			Table 3
        ),
        [Assignment Code] <> null
    )
)

View solution in original post

1 REPLY 1
themistoklis
Community Champion
Community Champion

@NittanyBlu 

 

If you want to do it using Power Query:

Go to Power Query Editor (Home --> Transform Data --> Transform Data)

Click on the table and find the column with the nulls

Click on the drop down arrow button and untick null.

 

Image below

notnull.jpg

 

Using DAX formula you can use something like the following:

NEW Table =
DISTINCT (
    FILTER (
        UNION (
            Table 1,
			Table 2,
			Table 3
        ),
        [Assignment Code] <> null
    )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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