Forum Discussion
jdevar243
2 years agoNew 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 ...
- 2 years ago
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])
FreemanZ
Super User
2 years agoHi 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]
)