meitale
meitale

Reputation: 157

tableau calculated field with condition giving error

I am trying to sum how much records my ML model was TP - table_classification = 1 and labeled=1

sum([model_classification]=1 AND [model_labeled]=1)

getting the below error:

sum is being called with boolean, did you mean float? 

Upvotes: 0

Views: 1076

Answers (1)

AnilGoyal
AnilGoyal

Reputation: 26218

Try this

sum(INT([model_classification]=1 AND [model_labeled]=1)) 

INT will convert boolean to Integer/numeric and thereaftyou can perform arithmetic calculation on that.

Upvotes: 1

Related Questions