Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BJW
Frequent 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.

 

1 ACCEPTED SOLUTION
Gordonlilj
Solution Sage
Solution 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
 

View solution in original post

2 REPLIES 2
Gordonlilj
Solution Sage
Solution 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
 

Worked perfect, thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors