This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I have a calculalted M query column
Receive and Close Date Flag
=
if
([Actual Closed Date] >= #"Parameter Date Closed Start Date"
or
[Date Received] >= #"Parameter Date Received Start Date" and [Deal Status Display] = "Open")
then "True" else "False"
And two Parameter of same date value is set at
Note that the result column is showing Error whe the Actual Close Date is Null
How can I fix this in my dax ?
Please mark the solution as "Accepted" if this works for you. Thanks.
If I type in the code exactly as described in my previous post, including the "try" at the beginning, and without the erroneous brackets, it works:
This is the code:
try if [Actual Date Closed] >= #"Parameter Date Closed Start Date" or [Date Received] >= #"Parameter Date Received Start Date" and [Deal Status Display] = "Open" then "True" else "False" otherwise null
It was Actual Date Closed, not Actual Closed Date, and there were some erroneous brackets
It is not working for me. Can you please update or test it out in the PBIX.
As an FYI, the cells showing as Error should display as False or True.
You need a "try" in front of the "if".
The syntax is:
try [THIS] otherwise [THAT]
where [THIS] is what you want to calculate i.e. your entire "IF" statement, and [THAT] is what you want to display if your calculation fails for any reason.
This gives Token eof Expected error.
Use this:
try if([Actual Closed Date] >= #"Parameter Date Closed Start Date" or [Date Received] >= #"Parameter Date Received Start Date" and [Deal Status Display] = "Open") then "True" else "False" otherwise null
see also:
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 19 | |
| 19 |