How to create a binary datatype result in the dataset

789    Asked by Namberumandubey in Tableau , Asked on Nov 5, 2019
Answered by Asutosh Jha

The binary data type can have only 2 values. Usually, those will be either a 0 or 1. For example, let’s say you have a sales column that has multiple values. Now let’s say you have a threshold of $5000 and you want all the values less than 5000 then it should be 0 else it is 1.

To do that you can create a calculated field with the codes like-

If sum(sales)

Else 0

END

Now if you will check, this will be a binary field.



Your Answer

Interviews

Parent Categories