Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have excel file which has a column called Result, it has either values of "Approved" or null. I am writing a if function in custom column which is checking few conditions like:
if [Required]=true then "Yes"
else if [Result]="Approved" then "Completed"
else "Not Completed"
However in the Result whereever Result is Approved, it Error in the new custom column. Other If results are fine.
Results is Text coulmn. Please suggest how to make this if statement work else if [Result]="Approved" then "Completed"
Expression.Error: We cannot convert the value null to type Logical.
Details:
Value=
Type=[Type]
This is the error.
As error suggests, your that column is having nulls, and we may be testing it for some value.
Compare with my sample data, check, else share a sample data pls.
Hi, are you sure that you have boolean values true or false in [Required] column? In my opition you have text values "true" or "false" there. If I'm correct, this should help you:
if [Required]="true" then "Yes"
else if [Result]="Approved" then "Completed"
else "Not Completed"
The error is not on the boolean value. The error is for the below line:
else if [Result]="Approved" then "Completed"
Where-ever Result is equal to Approved is not resulting in Completed. It gives ERROR is the custom coulmn.
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |