Forum Discussion

BJW's avatar
BJW
Frequent Visitor
7 years ago
Solved

Using a date/time field in Power BI

I'm quite new to Power BI, but I've been trying to google a solution without success.


I'm connected to a sharepoint list, and within that list there is a field called Meeting Date/time.  This field contains both date and time (formatted correctly by sharepoint list column).

 

I want another column in my query which looks at this date/time like this..

If meeting is less than now, then "Completed", else "Scheduled"

I've no idea how to set a new column as this in PowerBI, so some idiot guide is much appreciated.

thanks.

 

  • Hi,

     

    You could create a calculated column:

    Calc = if(Table[Column] < NOW(),"Completed","Scheduled")
    Or in power query add a custom column:
    if column < DateTime.LocalNow() then "Completed" else "Scheduled"
    Just change table/column to your own and it should work fine
     

2 Replies

  • Hi,

     

    You could create a calculated column:

    Calc = if(Table[Column] < NOW(),"Completed","Scheduled")
    Or in power query add a custom column:
    if column < DateTime.LocalNow() then "Completed" else "Scheduled"
    Just change table/column to your own and it should work fine
     
    • BJW's avatar
      BJW
      Frequent Visitor

      Worked perfect, thanks.