假设我有以下Excel数据:
+------+-------+--------+
| Item | User | Status |
+------+-------+--------+
| MTB | Bob | A |
| QCD | Bob | A |
| MTB | Alice | B |
| DFXR | Carol | A |
| QCD | Carol | B |
| MTB | Carol | B |
| MTB | Carol | A |
| DFXR | Carol | B |
+------+-------+--------+
我可以透视这个数据,让每用户通过项目项目类型的数量,通过将User
在Row Labels
框,Item
在Column Labels
框中,并Count of Item
在Values
框中。这给出了以下关键点:
+-------------+------+-----+-----+-------------+
| Row Labels | DFXR | MTB | QCD | Grand Total |
+-------------+------+-----+-----+-------------+
| Bob | | 1 | 1 | 2 |
| Alice | | 1 | | 1 |
| Carol | 2 | 2 | 1 | 5 |
| Grand Total | 2 | 4 | 2 | 8 |
+-------------+------+-----+-----+-------------+
我想创建一个枢轴,该枢轴将构成两套独立的Count of Item
列:一组用于Status =“ A”,另一组用于Status =“ B”。它看起来像这样:
+-------------+----------+---------+---------+----------+---------+---------+-------------+
| Row Labels | DFXR (A) | MTB (A) | QCD (A) | DFXR (B) | MTB (B) | QCD (B) | Grand Total |
+-------------+----------+---------+---------+----------+---------+---------+-------------+
| Bob | | 1 | 1 | | | | 2 |
| Alice | | | | | 1 | | 1 |
| Carol | 1 | 1 | | 1 | 1 | 1 | 5 |
| Grand Total | 1 | 2 | 1 | 1 | 2 | 1 | 8 |
+-------------+----------+---------+---------+----------+---------+---------+-------------+
我对列名的显示方式很灵活;重要的是,基于的计数Item
被分为两组Status
。我该怎么做?可以使用数据透视表吗?