Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe'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
I have a column "Visit Date" and I need to create a custom column which will determine the following.
When Visit Date is Blank - then "Not Scheduled"
When Visit Date is less than today - then "Completed"
When visit date is greater than today - then "Scheduled"
I tried this, but I'm getting errors.
if [[Visit Date] <= DateTime.LocalNow() and [Visit Date]<> Null then "Completed",
else if [[Visit Date]> DateTime.LocalNow then "Scheduled",
else if [Visit Date]=Null then "Not Scheduled"
Anyone be able to assist in correcting my error?
thanks.
Solved! Go to Solution.
Don't know if null should be case sensitive or not, but I'd put seeing if it's null as the first stage of your logic, something like:
if [Visit Date] = null then "Not Scheduled" else if [Visit Date] > Date.From(DateTime.LocalNow()) then "Scheduled" else "Completed"
Don't know if null should be case sensitive or not, but I'd put seeing if it's null as the first stage of your logic, something like:
if [Visit Date] = null then "Not Scheduled" else if [Visit Date] > Date.From(DateTime.LocalNow()) then "Scheduled" else "Completed"
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 |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |