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 blank end dates rows but not limited to slicer dates.

I have data with no end date and these are considered open events. Below is an example:

 

matrix_user_1-1666190521146.png

1) I have filtered this using a slicer from startdate 01/01/2022 to enddate 31/12/2022.

2) I am seeking a DAX measure to count rows of all rows with blank endates but no limited to the slicer's parameters.

In the above example, the DAX measurer I am seeking will yeild 3 counts of rows with no end dates (icd 001, icd 003 and icd 008) despite having start dates outside the slicer's paremeters.

3) The DAX measure will yeild counts for rows with both start dates and end dates but will not yield icd 002 or icd 010 because they do not fall within the slicer's parameters.

 

Kudos for your help.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @matrix_user ,

 

Slicer works:

Cases open = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Startdate]<MAX(slicer[date])&&('Table'[Enddate]>MIN(slicer[date])||ISBLANK('Table'[Enddate]))))

Slicer does not work:

Cases open = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),ISBLANK('Table' [Enddate])))

 

Best Regards,

Jay

View solution in original post

5 REPLIES 5
matrix_user
Helper III
Helper III

I am still struggling with this... the end result I am trying to acheive is to count rows with start date BUT no end date AND not limited to slicer's start date of "01/01/2022"

 

matrix_user_0-1666425584805.png

 

Karthikstark
Frequent Visitor

Try this 

AllDateswithBlank = CALCULATE(COUNTBLANK(DateTable[enddate]), ALL(DateTable[startdate]))
 
and for counting dates within the slice parameters:
 
CountRowsWithInSlicerParameters = COUNT(DateTable[enddate])
matrix_user
Helper III
Helper III

Hello,

 

If I use the ALL function where would I put it in the below Dax expression? This expression currently counts all the rows with no end date - but only within the slicer's parameters:

 

Cases open = 

VAR Enddatevisual = MAX ('Datetable' [Date])

VAR Startdatevisual = MIN ('Datetable' [Date])

VAR RSEULT = CALCULATE ([Total cases],

ISBLANK ('Table' [Enddate]))

RETURN

RESULT

 

Thank you,

Anonymous
Not applicable

Hi @matrix_user ,

 

Slicer works:

Cases open = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Startdate]<MAX(slicer[date])&&('Table'[Enddate]>MIN(slicer[date])||ISBLANK('Table'[Enddate]))))

Slicer does not work:

Cases open = CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),ISBLANK('Table' [Enddate])))

 

Best Regards,

Jay

Anonymous
Not applicable

Hi @matrix_user ,

 

You could use ALL() function to wrap the table and remove the filter while calculating.

https://learn.microsoft.com/en-us/dax/all-function-dax .

 

Best Regards,

Jay

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.