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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pfederica
Frequent Visitor

date column must contain unique values

Hi everyone,

i'm new on Power Bi.

i have sales data: i have a row for each sale at any time for different customers. So, my column timestamp is not univoque.

I'm tryng to mark a DateTable using my datetime column, but Power Bi tells me that that column must contain unique values.

How can i resolve it? 

 

Thanks very much!

1 ACCEPTED SOLUTION

Hi  @pfederica,

 

For your scenario, you could use MIN and MAX function because you have duplicate date which FIRSTDATE is not supported..

 

calendar.PNG

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @pfederica

 

You could create a calculated table with CALENDAR function or CALENDARAUTO function.

 

Then you could create the relationships between the Calendar table and your original table.

 

If you need further help, please share some data sample and you desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft

when i use the CALENDAR function the result is this: 

Datetable.PNG

The error message says that a date column has been specified with date duplicate.

 

And my data type is like that: 

DataID.PNG

 

How can I do?

Thanks a lot

Hi  @pfederica,

 

For your scenario, you could use MIN and MAX function because you have duplicate date which FIRSTDATE is not supported..

 

calendar.PNG

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Interkoubess
Solution Sage
Solution Sage

Hi @pfederica,

 

Yes you must create a calendar table with unique values ( there are lot of examples on the forum).

 

Because PB uses these uniques values to process time intelligence functions.

 

Let us know if you are experiencing some difficulties we can help.

 

Ninter.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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