splittableau-apidimensionsmeasures

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


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.


Solution

  • Have you tried using an IF statement:

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