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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.