Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Floor function error for HH:MM timestamp

Hi, 

 

I'm using SSAS tabular cube as data source and am not able to update the data source.

I have a timestamp that is in HH:mm format, and need to get 30 min intervals from that.

So placedtimestamp column in the image goes upto 23.59 and I need to get 30 min interval for this.

When I try to use floor or ceiling for it, it gives me result assuming the timestamp to be mm:ss.

 

Here is the DAX that I tried - 

Floor PlacedTimeStamp = FLOOR(MIN(Intraday_PowerBI_Source[PlacedTimeStamp]),"00:30"
 
  • Hi Anonymous,

     

    Just change the datatype to time, you will get the value in time. 

     

    Floor PlacedTimeStamp = FLOOR(Intraday_PowerBI_Source[PlacedTimeStamp],"00:30"

    Post changing the data type to time - 

     

1 Reply

  • Hi Anonymous,

     

    Just change the datatype to time, you will get the value in time. 

     

    Floor PlacedTimeStamp = FLOOR(Intraday_PowerBI_Source[PlacedTimeStamp],"00:30"

    Post changing the data type to time -