Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test for Divide By Zero

Status
Not open for further replies.

IanWaterman

Programmer
Jun 26, 2002
3,511
GB
Real Newbie to MDX

Can any one recommend a good book?

In mean time I need to modify my query to test for zero

with member [Measures].[Average Premium] as '[Measures].[NET PREMIUM]/([Measures].[POLICY COUNT], [Year].CurrentMember, [Transaction Type].CurrentMember)'

select NON EMPTY {[Measures].[NET PREMIUM], [Measures].[TOTAL AMOUNT], [Measures].[POLICY COUNT], [Measures].[Average Premium]} ON COLUMNS,
NON EMPTY Crossjoin(Hierarchize({[Year.Year].[All Years]}), {[Transaction Type.Transaction Type].[All transaction type]}) ON ROWS
from [Policy Analysis]

I want to return zero if either Net Premium or Policy Count are zero.

Thank you

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top