reporting services - Avoid divide by zero in SSRS expression -


i working on report attempting find percentage. code like:

= (fields!margin.value) / (fields!totalsales.value) * 100 

however problem in scenarios totalsales = 0.00 giving me error. not proficient in vbs. how do nullif type function avoid this?

this should work null , 0.

=iif(fields!totalsales.value <> 0 , (fields!margin.value) / (fields!totalsales.value) * 100 , 0) 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -