March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Can someone help me? I inserted the following function:
if [Status] = "in progress" and [Actual End] = null and [Scheduled End]> = Date.IsInCurrentDay then "3" else
if [Real Start] = null and [Programmed End]> = Date.IsInCurrentDay then "1" else
if [Actual End] <= Date.IsInCurrentDay and [Actual End] <= [Scheduled End] and [Actual End] <> null then "1" else "2"
I get the following message: Expression.Error: We were unable to apply the <operator to the Function and Date types.
Details:
Operator = <
Left = [Function]
Right = 08/29/2019
Can someone help me?
Maybe it is just how you posted it bu there were spaces between some of the >= so I removed those below. Hard to test though.
if [Status] = "in progress" and [Actual End] = null and [Scheduled End] >= Date.IsInCurrentDay then "3" else
if [Real Start] = null and [Programmed End] >= Date.IsInCurrentDay then "1" else
if [Actual End] <= Date.IsInCurrentDay and [Actual End] <= [Scheduled End] and [Actual End] <> null then "1" else "2"
Greg, first of all thank you for your interest in helping, but it has nothing to do with space. "No syntax errors detected". The "x" of the question here is how to compare a column with dates to a function. In the example case I am trying to use the "Date.IsInCurrentDay" function.
To make it clearer, I want to compare a column with dates and a function with a current date to find out if this condition sets a status to "Expired", for example.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
60 | |
31 | |
22 | |
19 | |
19 |