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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
cpowers31
New Member

Count of of Date Date Columns that Filters for Date

Hello! I have a table, 'Driver', with a column, [Termination Date]. I am trying to write a measure that counts how many fields in the column have dates, and have that number be able to be filtered by what date is in the field. I have been able to write a measure that returns the count but it does not respond to any of my date slicers I have on the page. Current DAX expression that I have applied is:  

DISTINCTCOUNT(Driver[Termination Date])
3 REPLIES 3
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

So here is an example of the table I am working with:

 

Driver_NameTermination_Date
Jim Smithnull
Jane Smithnull
John Jones5/20/2023
William Orange7/15/2023
Bill Jamesnull

 

Hoped for output would be it only counts the two that has dates next to it, and that it will respond to the date slicers I have already put onto that page. It should return a count of two if I have it filtered for May through July, only a one if filtered for just July, and a zero if filtered for August. I hope that made sense, and thank you for responding either way.

Add a calendar tabe to your data model, apply the filter to that table, and have a card visual that counts the number of rows in your fact table.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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