Forum Discussion

dpombal's avatar
dpombal
Icon for Post Partisan rankPost Partisan
9 months ago
Solved

timestamp custom format for milliseconds not working

Hi all

I have a timestamp with precission of milliseconds even nanoseconds and in powerbi desktop this custom format is not working

dd/MM/yyyy hh:mm:ss.fff

 

also tried with

 

dd/MM/yyyy hh:mm:ss.000

 

 

 

However in Power Query I can generate a text field including milliseconds with this M code

 

DateTime.ToText([TradeTimestamp], [Format = "yyyy-MMM-dd HH:mm:ss:fff", Culture = ""])

 

Thanks

  • Hi dpombal ,

    Create a duplicate column(TradeTimestamp-copy) in power query and convert it into Text.

    Then in Table visual ,use the TradeTimestamp-copy for table visual.For sorting TradeTimestamp-copy column use original TradeTimestamp column.

    Sample PBIX

    Please give Kudos or mark it as solution once confirmed.

     

    Thanks and Regards,

    Praful

7 Replies

  • Hi dpombal ,

    Create a duplicate column(TradeTimestamp-copy) in power query and convert it into Text.

    Then in Table visual ,use the TradeTimestamp-copy for table visual.For sorting TradeTimestamp-copy column use original TradeTimestamp column.

    Sample PBIX

    Please give Kudos or mark it as solution once confirmed.

     

    Thanks and Regards,

    Praful

    • dpombal's avatar
      dpombal
      Icon for Post Partisan rankPost Partisan

      for sorting do you use the original timestamp  or the number column you create?

  • Use a decimal field instead, or (the preferred option) split  your column into three parts - date, time, and milliseconds.

  •   

    Power BI's default Date/Time formatting does not support milliseconds (fff) in the visual formatting pane. To display milliseconds, you need to convert the datetime to text with milliseconds included.

     

    DateTime.ToText([TradeTimestamp], "dd/MM/yyyy HH:mm:ss.fff", "en-US")

    Then use this new text column in your report visuals.

     

    If this answer helped, please click Kudos or mark as Solution.
    -Kedar
    LinkedIn: https://www.linkedin.com/in/kedar-pande

    dpombal

    • dpombal's avatar
      dpombal
      Icon for Post Partisan rankPost Partisan

      Thanks Kedar this is a limitation as we need to keep 2 columns 1 with text and the original timestamp for sort by column and this is very storage size consuming, thanks

    • dpombal's avatar
      dpombal
      Icon for Post Partisan rankPost Partisan

      When will this be fixed? model size is huge to duplicate columns