I have a table with two columns. For simplicity, lets say Column A is General Contractors and Column B is subcontractors. Any given general contractor can have a variable number of subcontractors. I would like to add a third column that simply displays a count of how many subcontractors each contractor has.

I have tried several calculations using "fixed" and "include" functions as well as "Count" and "CountD" functions and have tried directly using the count functions (right-click>>measure>>count) but all I get are 1's in the resulting column.

The data come from a table where there is one row for each subcontractor, so the if a general contractor had 5 subcontractors then there would be 5 rows where the general contractor repeats it self over and over with a different subcontractor next to it.

There are far too many different general contractors to use conditional statements.

Is what I'm doing possible and what other things should I try?

1

Best Answer


Try this

{Fixed [general contractor]: Countd([sub contractor]) }

Add this field to your view after contractor and sub-contractor, you'll get that variable count say 5 repeated in each row that general contractor.