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

Distinct dates from specific date until today

I want to calculate the number of unique dates from a given date until today. Does anyone know how I can achieve this?

7 REPLIES 7
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Does your problem have been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

 

Best Regards,
Winniz

Pragati11
Super User
Super User

Hi @Anonymous ,

 

You can create a Calendar table in Power BI using your START DATE and END DATE. Something like below:

CALENDAR(DATE(2021, 1, 1), DATE(2021, 6, 1))

 

You can check more details here: https://docs.microsoft.com/en-us/dax/calendar-function-dax

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11, I already have a calendar/date table. I want to see how many days an employee has worked, by checking the distinct dates that occur in the source file until today.

Hi @Anonymous ,

 

Not sure if your question was clear in your query.

Please add more details on it like sample data input file and expeted output.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Let's say this is the data.

 

NameDate
X26-6-2021
Y27-6-2021
Z29-6-2021
X20-7-2021
Y23-7-2021
Z24-7-2021

 

I want to count the the number of unique dates for X, Y or Z from the first available date until today.

Hi @Anonymous ,

 

Try the following formula:

 

Measure = 
COUNTROWS(
    DATESBETWEEN(
        'calendar'[Date],
        MIN('Table'[Date]),
        TODAY()
    )
)

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous ,

 

Counting unique dates against a name is easy as shown below:

Pragati11_0-1624899223841.png

 

As you haven't attached the expected output along with the input, I will ask again what do you mean by - from the first available date until today ?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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