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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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