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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Count number of dates

Hello, I would like to have a measure that counts the total number of distinct dates appearing in each month regardless if a person has a value for a date or not. Thank you

 

guillaume_boism_2-1636390482157.png

 

 

Here's the table

guillaume_boism_3-1636390597517.png

 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

Nb of days measure =
  CALCULATE(DISTINCTCOUNT('Table'[Date]),REMOVEFILTER('Table'[Name]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

Nb of days measure =
  CALCULATE(DISTINCTCOUNT('Table'[Date]),REMOVEFILTER('Table'[Name]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler , it seems there's something I have trouble grasping with remove filters. In the example, I would like to have 9 instead of 4 and 5 (so the total number of different dates in all the months). I thought that adding 'Table'[date] to remove filters would do the trick but the result stays de same. Do you know how I need to tweak my measure? Thank you

 

calculate(DISTINCTCOUNT('Table'[Date]),REMOVEFILTERS('Table'[name],'Table'[date]))

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors