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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -