Reply
cpowers31
New Member
Partially syndicated - Outbound

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

Syndicated - Outbound

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...

Syndicated - Outbound

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.

Syndicated - Outbound

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.

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)