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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Tmk123
Helper II
Helper II

Expression.Error: We cannot convert the value 8659.5 to type Logical.

I've seen this error a few times in these forums but I cannot figure out how to apply those solutions to my own error.

 

Here are what my columns look like:

 

Tmk123_0-1690824171844.png

 

I have created a custom column using the following language to remove any "divide by zero" errors. All columns have been changed to a "type number" prior to me adding the custom column. Can anyone suggest a solution and explain why the error is produced?


= Table.AddColumn(#"Changed Type", "Custom", each if [Marlinn.Job allocations] and [#"Marlinn.Non-job allocations"] = 0 then [#"Marlinn.Qty on-hand"]


else if [Marlinn.Job allocations] = 0 and [#"Marlinn.Non-job allocations"] <> 0 then [#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [#"Marlinn.Non-job allocations"])


else if [#"Marlinn.Non-job allocations"] = 0 and [Marlinn.Job allocations] <> 0 then [Marlinn.Job allocations]
[#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [Marlinn.Job allocations])

 

else
[#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [Marlinn.Job allocations]) + ([Marlinn.Extended cost] / [#"Marlinn.Non-job allocations"]))

Tmk123_1-1690824188721.png

 

1 REPLY 1
bsixoa
New Member

At the point when I add the assertion for [Sale.Revenue] <> invalid I get a blunder anyway it turns out great for the [UserRole.Name] = invalid it turns out great. Tried by simply eliminating the assertion and adding it back.

 

 

 

snaptube vidmate

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors