KNOWLEDGE BASE

Count the Number of Items in a Set in Tableau


Published: 11 Nov 2022
Last Modified Date: 11 Nov 2022

Question

How to count the items of a set.

Environment

  • Tableau Desktop 2022.1

Answer

1. Create a calculated field with the name items using the following calculation:

value: COUNTD(IF [cate_code] IN [cate_ode set] THEN [cate_code] END)

※[cate_code] can be replaced by any field which you want to count the items of a set.

2. Drag items to the text card and check the result.
Did this article resolve the issue?