3 Replies Latest reply on Nov 30, 2016 5:27 PM by Shinichiro Murakami

# Find Count of records in a row for each product

Hello,

I have a data as below:

C

 City Jan Feb March April May June A 80 95 90 70 75 90 B 80 95 90 70 75 90 C 80 95 90 70 75 90

 City Jan Feb March April May June Count If Value > =80 A 80 95 90 70 75 90 4 B 80 95 90 70 75 90 4 C 80 95 90 70 75 90 4

Requirement :

Find the count of records which are greater than or equal to 80  for each measure.

I want to replace Count If Value >=80 with any Tableau Calculation function.

Regards,

Nagaraj

• ###### 1. Re: Find Count of records in a row for each product

HI Nagaraj,

I think data pivot is the easiest approach.

Quick Start: Pivot Data from Columns to Rows

Create calculated field

[Count >=80]

count(if [Value]>=80 then [Month] end)

Thanks,

Shin

• ###### 2. Re: Find Count of records in a row for each product

Thanks Shin for the update.

I am getting the data from a database and has around 30 measures with different dimensions and a data source is Published on this.

Let me know if I can use any calculations to derive the same.

• ###### 3. Re: Find Count of records in a row for each product

This is a formula.  troublesome, but you can do that.

Fundamental solution is re-structure the original data source.

In case "80" is changing, added parameter.

Thanks,

Shin