Tableau - Split a measure into measures (one for negative numbers, one for positive numbers)

2.1k Views Asked by At

Does anyone know how to take one measure and split it into two new measures. The first measure will include only positive numbers, the second will contain only negative numbers.

I have tried creating a group. This makes the new group a dimension, the only way I can switch it back to a measure is by doing a split first. Makes no sense to me. Bins also doesn't work.

2

There are 2 best solutions below

0
Jaime Hutchins On BEST ANSWER

Have you tried using an IF statement:

IF {measure > 0} THEN 'Positive' ELSEIF {measure < 0} 'Negative' END
0
Siva On

Create two calculated fields:

Positive measure

if measure >=0 // including values with 0 in positive
then measure
end

Negative measure

if measure<0
then measure
end