We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 38 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 38 | |
| 34 | |
| 22 |