Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Pivot table

I have a table which contains the columns: employee, salary, hourly, bonus, compensation. I want to create  chart which has has three columns: employee, pay type and pay. The employee column would be contain the same employee name as in the first table, the pay type would be either salary, hourly, bonus or compensation. There would be multiple rows per employee, one for each pay type, but only if there is a value in the corresponding column in the first table, if it is blank there would be no row for it. And then the pay column would have the dollar amount from the first column.

 

Can this be done in Power BI? If so, how?

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

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:

 

q1.PNG

 

2. Use "Unpivot Other Columns" option.

 

q4.png

 

q3.PNG

 

If I misunderstand your requirement, please share some sample data and screenshots about desired results for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

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:

 

q1.PNG

 

2. Use "Unpivot Other Columns" option.

 

q4.png

 

q3.PNG

 

If I misunderstand your requirement, please share some sample data and screenshots about desired results for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Perfect. Thanks!

Greg_Deckler
Community Champion
Community Champion

Power BI does not have a true pivot table visualization with all of the features/functionality of Excel pivot tables. However, for you needs, it sounds like the matrix visualization should be able to do what you want.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.