Expression:
ISNULL(ParentValue) || (ParentValue == 0) ? 0 : ROUND(ISNULL(ActivityCount) ? 0 : ActivityCount / ParentValue / 100,16) * 100
For readability:
ISNULL(ParentValue) || (ParentValue == 0)
? 0
: ROUND((ISNULL(ActivityCount)
? 0
: ActivityCount / ParentValue) / 100
, 16) * 100
What it does:
If ParentValue field is NULL or has Zero, you do not have to perform a calculation because you will encounter Divide by Zero error. So, simply exit the expression by returning 0.
If ActivityCount field is NULL, replace it with zero before performing the calculation.
Recommendation:
I would recommend using COALESCE on the source query to replace the NULL values with zeroes and the calculation, if possible.