Forum Discussion

niyati_61's avatar
niyati_61
Helper III
4 years ago
Solved

Time Table

Hello all,    I'm working with live data, and as seen in the TimeStamp Column here, On 1 Day, every 5 seconds the sensor generates data. Table Name = SensorData   I have created a normal D...
  • v-jingzhang's avatar
    4 years ago

    Hi niyati_61 

     

    You can extract date value and time value from TIMESTAMP column into two new columns in SensorData table. Change their data types to Date type and Time type accordingly. 

    Date = DATEVALUE('SensorData'[TIMESTAMP])
    
    Time = TIMEVALUE('SensorData'[TIMESTAMP])

     

    Create a time table with below DAX. I only include time values in this table and change its data type to Time type. 

    TimeTable = GENERATESERIES(TIMEVALUE("00:00:00"),TIMEVALUE("23:59:59"),5/(60*60*24))

     

    When you create relationships, you can link Date table to SensorData table on Date column and link Time table to SensorData table on Time column. Download the attached pbix for details. Hope this helps. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.