Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
thechad13
Helper I
Helper I

Receiving [Expression.Error]

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. 

2 REPLIES 2
HotChilli
Super User
Super User

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. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.