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! Learn more

Reply
JpTall
Frequent Visitor

FIRSTDATE() Error

"A date column containing duplicate dates was specified in the call to function 'FIRSTDATE'. This is not supported."

 

I am trying to get the first outcome date for a referral. I have an OUTCOME table and a REFERRAL table both joined 1:1 using referral referances. These are unique column with no duplicates yet I still get the error above.

 

Furthermore - The error seems to be resolved when I remove duplicates from the appointment reference column (there are no duplicates other than nulls and I want nulls included). Not sure why this fixes it as It has nothing to do with the relationship - Is there something I'm missing?

 

Any support appreciated.

9 REPLIES 9
Syndicate_Admin
Administrator
Administrator

Hello, the same thing happened to me and I could solve it from Power Query, modifying the Format Type from "Date / Time" to simply "Date". Then I generated the calendar seamlessly with the Calendar feature

Hopefully that's it!

Best regards

Anonymous
Not applicable

Hi@JpTall,

 

Do you use the time intelligence function with a calendar table? If not, it can also cause this error.

Did this error message occur when you tried to graph it? If so,after you have dragged the new column into a graph in Power BI, you can try setting the way it aggregates to “Do Not Summarize".

 

Hope it helps.



Best Regards,
Caitlyn Yan

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

 

VijayP
Super User
Super User

@JpTall 

To get the outcome why can't you use Min() Function instead of FirstDate?!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


JpTall
Frequent Visitor

When I use MIN() it generates the 1st date from the entire table for each record in my new column (all the same date). But I want the first date from each referral in that table to be added into the column.

 

Usually the join works here. I have also removed dupliaces from the join column but it doesn't help.

PC2790
Community Champion
Community Champion

You can use the logic in such a way that it gets the FirstDate if there is no blank value, something like

Calculated column = if(not(ISBLANK(YourColumn)),<FIRSTDATE application>,BLANK())

 

This was the formula will not break because of blanks and the values will also stay intact

 

If you share our sample dataset, a more precise version of the formula can be provided

 

Thankyou

JpTall
Frequent Visitor

Sorry it's not letting me paste in an example of the data.

JpTall
Frequent Visitor

It still doesn't like the FIRSTDATE application in that formula.

PC2790
Community Champion
Community Champion

Would it be possible for you to provide your pbix file removing any sensitive data if there is any?

JpTall
Frequent Visitor

I'm just looking at anonomysing that.

For the time being, how would I attach that here?

 

Thanks

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