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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
matrix_user
Helper III
Helper III

Count rows with conditions based on two columns.

Hello,

 

I am looking for help for a DAX expression (measure) that would allow me to count rows with the condition that it has a start date and no end date only. Based on the example bellow the DAX expression I am looking for should yield the result of 5 counts.

ID 001Start dateEnd date
ID 00212/05/201617/09/2016
ID 00325/09/199012/07/1994
ID 0042/04/200218/08/2003
ID 0054/07/2014 
ID 00613/03/202220/04/2022
ID 00711/06/2021 
ID 00818/12/2012 
ID 00912/04/2022 
ID 0101/02/2017 
   
Total count  without End date = 5
Total count with End date = 4

 

Many thanks.

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @matrix_user 

please try

Count =
COUNTROWS (
    FILTER (
        'Table',
        NOT ISBLANK ( 'Table'[Start Date] ) && ISBLANK ( 'Table'[End Date] )
    )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @matrix_user 

please try

Count =
COUNTROWS (
    FILTER (
        'Table',
        NOT ISBLANK ( 'Table'[Start Date] ) && ISBLANK ( 'Table'[End Date] )
    )
)
Jayee
Responsive Resident
Responsive Resident

Hi Matrix_user

 

here the Measure formula for your query

Count with End Date = COUNTX('Table','Table'[End date])
Count without End Date = COUNTX('Table',IF(ISBLANK('Table'[End date]),1))

Jayee_0-1666151853068.png

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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