Forum Discussion

pfederica's avatar
pfederica
Frequent Visitor
8 years ago
Solved

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!

  • Hi  pfederica,

     

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

     

     

    Best Regards,

    Cherry

5 Replies

  • 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.

  • v-piga-msft's avatar
    v-piga-msft
    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

    • pfederica's avatar
      pfederica
      Frequent Visitor

      Hi v-piga-msft

      when i use the CALENDAR function the result is this: 

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

       

      And my data type is like that: 

       

      How can I do?

      Thanks a lot

      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        Hi  pfederica,

         

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

         

         

        Best Regards,

        Cherry