This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello All
How can i traslate this excel expression to power query calculated column.
If Startdate is before TaskStartDate then Plan TaskStartDate
else if Start date is between Taskstartdate and TaskEnddate then startdate
else if start date is after TaskEndDate else null
RP
Solved! Go to Solution.
Add a Custom Column within Power Query and then write:
if [startdate] is null then null else
if [startdate] < [TaskStartDate] then [Plan TaskStartDate] else if
[startdate] >= [TaskStartDate] and if [startdate] <= [TaskEnddate] then [startdate] else if [start date] > [TaskEndDate] then [whatevercolumnorconditionyouneed] else null
I purposefully started with an evaluation of the startdate being null, because if you have null values in that column, you'll get an error after creating the column.
Proud to be a Super User!
Add a Custom Column within Power Query and then write:
if [startdate] is null then null else
if [startdate] < [TaskStartDate] then [Plan TaskStartDate] else if
[startdate] >= [TaskStartDate] and if [startdate] <= [TaskEnddate] then [startdate] else if [start date] > [TaskEndDate] then [whatevercolumnorconditionyouneed] else null
I purposefully started with an evaluation of the startdate being null, because if you have null values in that column, you'll get an error after creating the column.
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 39 | |
| 33 | |
| 24 | |
| 23 |