innocent1973 used Ask the Experts™
Hello Experts,
I have a SSRS reports that displays weekly sales and Store inventory levels. In this report, I have used a calculated member named "Branch Stock Value". And its expression is:

Now, I would llike to use another calculated member that uses this BranchStockValue member. My desires calculated member expression is:

BranchStockValue / SalesValue

I get divide by zero or other null errors. But the final purposed result is really very easy.

I have also attached a screenshot that displays my report layout. For example for the first line Branch Week Cover value should be 12544.36 / 1656.39 =  7.57

Please help
Fields!Store_Stock_Level.Value *(Fields!PS.Value - ((Fields!PS.Value * Fields!VAT_Rate.Value)/100))

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
make a coded formula for safe divide

Public Function DivideBy(ByVal Exp1, ByVal Exp2)
 If Exp2  is nothing or Exp2 = 0 Then
 DivideBy = 0
 Else: DivideBy = Exp1/Exp2
 End If
End Function

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial