Forum Discussion
Pivot table
- 9 years ago
Hi Anonymous,
If I understand correctly, the table contains five columns: Employee, Salary, Hourly, Bonus, Compensation. And you want to get the table with three columns: Employee, Pay type (contains Salary, Hourly, Bonus and Compensation) and pay, right?
In your scenario, you can open Query Editor, then check the Employee column, click Unpivot Other Columns. If original table columns Salary, Hourly, Bonus or Compensation is blank, there is no row for it after this operation automatically. See:
1. Assume the original table is below:
2. Use "Unpivot Other Columns" option.
If I misunderstand your requirement, please share some sample data and screenshots about desired results for our analysis.
Best Regards,
Qiuyun Yu
Hi Anonymous,
If I understand correctly, the table contains five columns: Employee, Salary, Hourly, Bonus, Compensation. And you want to get the table with three columns: Employee, Pay type (contains Salary, Hourly, Bonus and Compensation) and pay, right?
In your scenario, you can open Query Editor, then check the Employee column, click Unpivot Other Columns. If original table columns Salary, Hourly, Bonus or Compensation is blank, there is no row for it after this operation automatically. See:
1. Assume the original table is below:
2. Use "Unpivot Other Columns" option.
If I misunderstand your requirement, please share some sample data and screenshots about desired results for our analysis.
Best Regards,
Qiuyun Yu
Perfect. Thanks!