Forum Discussion

Samiks95's avatar
Samiks95
Regular Visitor
3 years ago
Solved

Dax help

Hello, 

I have a column called CheckIn Time. 

Data type: Text , Format: Text, Data category: Uncategorized. 

I want to create a new column called Period of the day. Same like the one in the pic. In period of the day, i want to categorize the

checkin Time into different period of the day. How do i Start?

Please help .. 

 


 

  • Samiks95 , Create a new column

     

    =

    var _time  = timevalue([Checkin time])

    return

    Switch( True() ,

    _time < time(7,0,0) , "Early Morning",

    _time < time(7,0,0) , "Last Morning",

    // add other

    "Late Night")

     

    Change as per need

1 Reply

  • Samiks95 , Create a new column

     

    =

    var _time  = timevalue([Checkin time])

    return

    Switch( True() ,

    _time < time(7,0,0) , "Early Morning",

    _time < time(7,0,0) , "Last Morning",

    // add other

    "Late Night")

     

    Change as per need