Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have received the following error when adding a Custom column: [Expression.Error] We cannot convert the value null to type Logical.
I used one column that is formatted as Whole Number and I want the custom column to display values based on the row value with the initial Whole Number column. Here is the DAX that I have used:
Table.AddColumn(#"Expanded Table Column1", "Axle Category", each if ([Total Axles]=2) then "2"
else if ([Total Axles] = 3 or [Total Axles]=4) then "3-4" else if ([Total Axles]=5 or [Total Axles]=6 or [Total Axles]=7) then "5-7"
else if ([Total Axles]>7) then "7+"
else 0)
The new column default format is ABC123.
Why am I getting this error and is there a way around it?
Thanks in advance.
Do you have a null in the Total Axles column?
No there isn't which is another reason why it doesn't make any sense. Even when I load everything there are none.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |