1 Reply Latest reply on Mar 27, 2018 3:33 PM by Deepak Rai

    Calculated Field:Distinct Count based on a Sum of Another Field

    Daniel Riopelle

      Hello there,


      I'm looking for what might be a bit of a complicated formula, I'm stumped on how to do this in Tableau like I did in Excel. Suppose I have the following dataset:

      Sales RepOrder NumberRevenue ($)

      I want a disctinct count of sales reps in this set. They may have more than one order (like rep 001), and if the sum of their orders is a negative value, they are not included in the distinct count of sales reps (so rep 001 would not be included in the distinct count since his total revenue is -$5). The correct distinct count for this dataset would be 3. Any idea how to calculate this?