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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jdevar243
New Member

Future Date calculation in powerquery

Hi,

 

I am new to Power BI and need assistance to achieve this below requirement and appreciate any help.

 

I have a Status column with (A,B,C) values and a created date (Values when a record is created). Now,I need to create another date column (Future Date) with these conditions.

When Status = 'A' then Future_date = (Created_Date + 6 months) else

Status ='B' then Future_date=(Created_Date+3months) end.

 

Thanks again for your help. 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi @jdevar243 ,

 

in Power Query, try to add a custom column like:
 
= if [status] = "A" then Date.AddMonths ([Created_Date], 6) 
else if [status] = "B" then Date.AddMonths ([Created_Date], 3)
else [Created_Date]
 
 
or with DAX,  add a calculated column like:
Column = 
SWITCH(
    TRUE(),
    [Status] = "A", EDATE([Created_Date], 6),
    [Status] = "B", EDATE([Created_Date], 3),
    [Created_Date]
)

View solution in original post

2 REPLIES 2
jdevar243
New Member

Thank you. Appericate your response.

FreemanZ
Super User
Super User

Hi @jdevar243 ,

 

in Power Query, try to add a custom column like:
 
= if [status] = "A" then Date.AddMonths ([Created_Date], 6) 
else if [status] = "B" then Date.AddMonths ([Created_Date], 3)
else [Created_Date]
 
 
or with DAX,  add a calculated column like:
Column = 
SWITCH(
    TRUE(),
    [Status] = "A", EDATE([Created_Date], 6),
    [Status] = "B", EDATE([Created_Date], 3),
    [Created_Date]
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.