Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 133 | |
| 104 | |
| 61 | |
| 59 | |
| 55 |