Forum Discussion
BJW
7 years agoFrequent Visitor
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
- GordonliljSolution Sage
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- BJWFrequent Visitor
Worked perfect, thanks.