Pivot Table with multiple rows all having the same level hierarchy

4.2k views Asked by At

I have imported a bunch of data using PowerQuery into a single table and am building dashboard reporting. I have been using Pivot Tables to build my reports, which has worked fine so far.

However, I've come to a point though where I want to simply show the count of multiple columns (calculated fields). So I have column A,B,C,D, and want to show the count each of each. But, I don't want them to be subsets (or children) of one another, and I don't want to build a bunch of Pivot Tables (file is already getting pretty big, and I want them row by row for easy viewing). Any suggestions?

Also, I am using the "Columns" field already to show the counts by certain weeks (week one, week two, etc.).

Thanks,

-A

Thanks for the follow-up. Within PowerPivot, I have four calculated fields/columns that are True/False for each column. I want to know how many times each of those columns were marked "True" (I can rename the "True" field to distinguish between which field it's referencing). But I don't want four pivot tables. Right now I can only think of making four pivot tables, filtering out the false for each one, then hiding the rows so the "True" values stack on top of one another. If I put all the four fields together in the same Pivot, the three below the first become subsets. I don't want subsets, just occurrence counts.

Does this help provide clarification?

1

There are 1 answers

2
Gordon K On BEST ANSWER

If I understand you correctly, here's an example that shows what you're trying to achieve:

Simple example of true/false count using pets

The table on the left has the TRUE/FALSE entries and the PivotTable on the right just shows the number of true items in each of those columns.

The format of the DAX measure to produce these count totals is:

[Count of A]=CALCULATE(COUNTROWS(PetFacts),PetFacts[A]=TRUE)

(Apologies to any parrot owners who may get upset that I have inadvertently re-classified their pets as cold-blooded!)