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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Date and Time

Hi,

 

I need to add today's date with one column which will return date column.I have a logic in spotfire and I need to implement in power BI.I am sharing the logic for spotfire

If((left([STATUS],2)="01")
Or (left([STATUS],2)="02")
Or (left([STATUS],2)="04")
Or (left([STATUS],2)="10")
Or (left([STATUS],2)="11")
Or (left([STATUS],2)="13")
Or (left([STATUS],2)="30")
Or (left([STATUS],2)="50")
Or (left([STATUS],2)="60"),
Date(DateAdd("day",[ST_Leadtime level],DateTimeNow())),NULL)

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

If you are trying to add a new column then try as follows:

NewColumn = IF( left([STATUS],2) IN {"01","02","04","10","11","13","30","50","60"}, [ST_Leadtime level] + NOW() )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

 

How to implement the below condition in the Power Query Editor.

If((left([STATUS],2)="01")
Or (left([STATUS],2)="02")
Or (left([STATUS],2)="04")
Or (left([STATUS],2)="10")
Or (left([STATUS],2)="11")
Or (left([STATUS],2)="13")
Or (left([STATUS],2)="30")
Or (left([STATUS],2)="50")
Or (left([STATUS],2)="60"),
Date(DateAdd("day",[ST_Leadtime level],DateTimeNow())),NULL)

Fowmy
Super User
Super User

@Anonymous 

If you are trying to add a new column then try as follows:

NewColumn = IF( left([STATUS],2) IN {"01","02","04","10","11","13","30","50","60"}, [ST_Leadtime level] + NOW() )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hi,

 

How to implement the below condition in the Power Query Editor.

If((left([STATUS],2)="01")
Or (left([STATUS],2)="02")
Or (left([STATUS],2)="04")
Or (left([STATUS],2)="10")
Or (left([STATUS],2)="11")
Or (left([STATUS],2)="13")
Or (left([STATUS],2)="30")
Or (left([STATUS],2)="50")
Or (left([STATUS],2)="60"),
Date(DateAdd("day",[ST_Leadtime level],DateTimeNow())),NULL)

Anonymous
Not applicable

Thank you.It's working.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.