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
Post a Comment