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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors