Im working with a table similar to this one:
I want to create a pivot table that organizes the data by the "GRUPO" column, indicating the reason for leaving a company.
For example, in the table above, DK would have to have SALARIO = 2 (there are 2 people in group DK who between RAZÓN 1 and RAZÓN 2 have checked SALARIO).
I manage to do something like this:
But is not working correctly, as you see, i only want the final result for each RAZÓN...
Any help? Thanks!
Well, there might be other ways to accomplish this task, however this is what i usually do, since i found it easy one for me, so you can follow the steps and refer image as well,
1.) Select any cell within the table ie your ORIGINAL DATA SOURCE
,
2.) Now from Data Tab
--> Goto --> Get & Transform Data Group
--> From there click --> From Table/Range
,
3.) On selecting the one i have mentioned above, shall open the Power Query Editor
,
4.) From Query Settings Panel, under PROPERTIES
change the name to Grupotbl
5.) Now select any column and press CTRL A
to select the whole table to change the data type, from TRANSFORM TAB
--> Under Any Column Group --> Click Detect Data Type, this shall add one step in the APPLIED STEPS
as Changed Type ,
6.) Next select the first three columns and right click & select --> Unpivot Other Columns
, eventually adding one steps under APPLIED STEPS
as Unpivoted Other Columns
7.) Now rename the column Value as Razon
8.) Press CTRL and select the columns other than column named Attribute
, right click Remove Other Columns
,
9.) From HOME TAB
under Close click the dropdown and click Close & Load To
,
10.) On doing above, you shall get this and click Only Create Connection
and check the Add this data to the Data Model
--> Press Ok,
11.) From Insert Tab
--> Pivot Table
--> From Data Model
--> You can either choose New Worksheet or Existing Worksheet
, which ever suits you best, for this example i have selected existing worksheet cell A9
However you can also right click on the QUERIES & CONNECTIONS
and click load to Pivot Table Report
and Press Ok.
12.) So you see the Pivot Table layout has been created and you can also find the Pivot Table Fields Panel on the right side of your worksheet, From Fields panel you will find all the tables has been listed, select the Grupo Table --> Drag the Grupo Field in the Rows Areas while the Razon will be in the Values area respectively, you can change the layout design from design table, as well as from Report Layout change it to Show in Tabular Form.
13.) In this manner you can Transform
your data to Summarize a Pivot Table !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.