instead of using a function like
ZN(IF ATTR([Dim Audit Type Key]) = 1 THEN COUNTD([WO Audit]) END)
ZN(COUNTD(IF [Dim Audit Type Key] = 1 THEN [WO Audit] END))
This way you avoid using the ATTR() function, which is the cause of the 0s.
If you look on the Grand Total in your crosstab, you also have 0 because Tableau don't take into account the Dim Audit Type Key level of detail when computing the total. And since ATTR([Dim Audit Type Key]) returns null because there is not a single value of Dim Audit Type Key in the view , the if condition is false and no countd is computed.
The same thing happens in the Pie Chart where you don't have Dim Audit Type Key in the view.
Using the corrected formulas , the if logic is applied individually on each row, then the result is aggregated according to the level detail of the view.
Woohoo!! Thanks so much, this works perfectly.