1 Reply Latest reply on Aug 24, 2016 6:40 PM by Tom W

# Double-Counting with different Measure Names?

I've got some data that looks like the below table.

What I'm looking for is a method to tally the number of questions in which 'diversity' appears in ANY index, for example.

 Question Index 1 Index 2 Index 3 1 Diversity Leadership Facility 2 Leadership Diversity Facility 3 Leadership 4 Diversity 5 Facility 6 Facility 7 Diversity Facility 8 Overall Facility Diversity

So, COUNT(Diversity) (well, the calculation that's analogous to that) should be equal to 5.

The below logic seems like it's almost there, except it only counts each row once.

if [Index 1] = "Facility"

OR [Index 2] = "Facility"

OR [Index 3] = "Facility"

THEN "Facility"

elseif [Index 1] = "Diversity"

OR [Index 2] = "Diversity"

OR [Index 3] = "Diversity"

THEN "Diversity"

ELSEIF  [Index 1] = "Overall"

OR [Index 2] = "Overall"

OR [Index 3] = "Overall"

THEN "Overall"

END

But only counts each line once.  Any idea of how to get the double-tally going so that they can appear in the same graph?  I could make 3 separate graphs but it complicates things for filters and connectivity.

See attached workbook.

• ###### 1. Re: Double-Counting with different Measure Names?

The problem is that each row can only evaluate to true once.

For what you're trying to do, you really need to look into pivoting your data so you have one row per Index.

You could create a calculated field per index i.e.

COUNT(IF [Index 1]="Diversity" then [Index 1] end)

+

COUNT(IF [Index 2]="Diversity" then [Index 1] end)

+

COUNT(IF [Index 3]="Diversity" then [Index 1] end)

then include this in your report using the measure names and measure values pills, but I'm not sure if that will work in your real scenario.