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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PreetiSahu321
Helper I
Helper I

Delete empty rows using Power BI DAX

Hello Power BI Community Members,

Below represents a dummy Power BI table with one ID Column, Four date columns and one project name column which makes a couple of duplicates.

 

Here one project name had the date information which I need and one did not have any date data that means I want to delete the duplicate rows where there is no data under the 'dates' columns.

I want to delete these empty rows (i.e. Project 1 with ID 111, Project 3 and Project 4) by using the Power BI DAX.

 

1234.png

 

Can anyone suggest to me what I have to do in this case?

Thanks in Advance!!!

4 REPLIES 4
az38
Community Champion
Community Champion

@PreetiSahu321 

also, you can try a calculated column 

isThereAnyDate = if(ISBLANK('Table'[Date1]) && ISBLANK('Table'[Date2]) && ISBLANK('Table'[Date3]) && ISBLANK('Table'[Date4]),false(),true())

then filter your data by isThereAnyDate = true condition

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
az38
Community Champion
Community Champion

Hi @PreetiSahu321 

there are 2 options

 

first (and prefferably from my point of view), you can just set as inactive "Show items with no data" in visual field Project name settings

second, you can create a calculated table like

Filtered Table = FILTER(
ALL('Table'),
NOT(ISBLANK('Table'[Date1])) || NOT(ISBLANK('Table'[Date2])) || NOT(ISBLANK('Table'[Date3])) || NOT(ISBLANK('Table'[Date4]))
)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Interesting approach above. I attempted the above solution and resulted in an error.

However, I was able to replicate a solution using measures to calculate the MAX Date for each date column.

 

example.png

 

MAX Date1 = MAX ( table[date1] )

MAX Date2 = MAX ( table[date2] )

MAX Date3 = MAX ( table[date3] )

MAX Date4 = MAX ( table[date4] )

 

Visual is Table w/

Project, and the newly created measures.

@AlexAlberga727 

i see the only possible error in the statement above - using comma "," as delimiter but not semicolon ":". It is the locale question and it is not error

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.