A division by zero has been encountered

frankee_gee

Board Regular
Joined
Mar 3, 2008
Messages
144
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello Everyone, Needed some help with this error

MdxScript(Model) (6,54) Calculation error in measure 't_Track'[Spend/ErectLegFT]. A division by zero has been encountered.

This is the formula:

Code:
Spend/ErectLegFT:=CALCULATE([LaborSpend]/[ErectLegFT],lu_ActivityType[ActivityDesc]="Erect")

Was working well in 2015Q3. But now during 2015Q4, is is no longer working

I would prefer to find the errors and correct them, because all it means is that data is missing and I would need to fill in at some point thru a manual reconcile process.


How can I capture where this error is occurring?

If it's not possible to capture where the error is occurring, I found this possible solution after some research, it was suggested to use Divide function because it ignores ZERO's

Not sure how to use the filter for the last part of the original Calculate function: lu_ActivityType[ActivityDesc]="Erect"

it would look something like this :
Code:
Spend/ErectLegFT:=DIVIDE([LaborSpend],[ErectLegFT])
where or how do I add the following filter :
Code:
lu_ActivityType[ActivityDesc]="Erect"

Many thanks for your help in advance.

Frank.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I was able to get this working using this formula:

Spend/ErectLegFT:=CALCULATE([LaborSpend]/[ErectLegFT],lu_ActivityType[ActivityDesc]="Erect")

but now the slicers don't function as expected.


So will need help with finding what is data is causing the error: "A division by zero has been encountered"

Thanks again.

Frank.
 
Upvote 0
I'm not entirely sure this is what you're after, but give it a shot:

Spend/ErectLegFT :=
CALCULATE ( DIVIDE (SUM ( [LaborSpend] ), SUM ( [ErectLegFT] ) ), lu_ActivityType[ActivityDesc]="Erect" )
 
Upvote 0
Thanks Simon - I attempted to use this formula and it returned errors. nothing ever calculated.
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top