3

This is a snapshot of the data pulled into Tableau: enter image description here

Success Count is defined as if [Task Status Cal]="Success" then [Wo_ID]

The formula for [Success Count] was:

IF [Task Status Cal] = "Success" then STR([Wo Id])
end

Tableau considered this formula to be valid.

I am not sure why the result was null in cases where the above condition was true.

Thank you!

Anna Huang
  • 287
  • 2
  • 5
  • 15
  • Also, is there an easier way to do this: I want to get count distinct WO_ID where task status calc was "Success". – Anna Huang Jul 10 '17 at 20:33
  • You have multiple data rows per Wo Id. Do you want to count Wo Ids that have at least one row with task status = Success? or Wo Ids that have every row with task status = Success? or most rows = success? i.e., be clear what you are counting. – Alex Blakemore Jul 10 '17 at 21:28
  • It could be trailing spaces. Can you try `IF REPLACE([Task Status Cal]," ","") = "Success" THEN STR([Wo Id]) END`? – Prem Jul 11 '17 at 07:21

1 Answers1

5

Do the next: countd(IF [Task Status Cal] = "Success" THEN [Wo Id] END) it should fix the problem :)