Forum Discussion

TomLU123's avatar
TomLU123
Icon for Helper III rankHelper III
7 years ago
Solved

How to create a new table based on another table?

Hi Expert,

 

I have a data set which is the list of employees, their department and slary. The table looks like below:

Employee IDDepartmentSalary
AHR100
BHR200
CIT100
DMarketing300
EMarketing400
FAdmin300
GAdmin400
HAdmin200

 

I wan to create a new table (not the visualization in the canva) which summaries the headcount, total labor cost and average labor cost of each department. 

DepartmentTotal Labor CostHeadcountAv. Labor Cost (Total Labor Cost/Headcount)
HR3002150
IT1001100
Marketing7002350
Admin9003300

 

Is it possible to use the DAX to achieve that?

Many thanks!


Best regards,

Tom

  • TomLU123 Please create a New Table as below

     

    Test270Out = SUMMARIZE(Test270Summarize,Test270Summarize[Department],"TotalLabourCost",SUM(Test270Summarize[Salary]),"HeadCount",COUNT(Test270Summarize[Employee ID]),"AvgLabourCost",AVERAGE(Test270Summarize[Salary]))

1 Reply

  • PattemManohar's avatar
    PattemManohar
    Icon for Community Champion rankCommunity Champion

    TomLU123 Please create a New Table as below

     

    Test270Out = SUMMARIZE(Test270Summarize,Test270Summarize[Department],"TotalLabourCost",SUM(Test270Summarize[Salary]),"HeadCount",COUNT(Test270Summarize[Employee ID]),"AvgLabourCost",AVERAGE(Test270Summarize[Salary]))