Chuck
Chuck

Reputation: 1293

how to create a set based on a measure value in Tableau?

This is a very simple thing and I can't believe Tableau makes it so hard. I have a bunch of fields, and one measure has many zeroes. I just want to create a subset of the data where this measure > 0.

I can do it with a filter, but I since I will use it several times, it makes sense to create a set once and keep using it. Am I wrong to want to do that? Because I am finding it's just easier to just keep creating the filter in different sheets instead of trying to figure out the set.

I keep referring to this page, but they start out by telling you to right click on a dimension and create a set.

https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.htm

I keep ending up here. What does it mean to apply a condition where the sum > 0? I want a set with any value > 0. That's not the same as a sum.

enter image description here

Upvotes: 2

Views: 1196

Answers (1)

AnilGoyal
AnilGoyal

Reputation: 26218

Actually your use case is not appropriate for sets. Sets in tableau work on IN/OUT principle. So the sets can be used as a T/F condition as well as used to differentiate the members IN and OUT of that set e.g. by differentiating these by colors.

What I can understand is that you just want to create a Calculating field which you can use as a ready filter as well as for differentiation also.

To illustrate let's take the following sample data

enter image description here

Now create a calculated field with the following calculation

[Measure] > 0

(Note- this would exclude negative values also. If your data set has negative values and you just want to exclude 0 values use <> instead.)

This calculated field will serve your purpose. See

enter image description here

and

enter image description here

Better seen with average

enter image description here

and

enter image description here

Good Luck.

Upvotes: 1

Related Questions