Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi community,
Following is my sample dataset, I want to add a column "Total Sal"(already added in the following snapshot) that is total of distinct salaries of employees. Grouped by Dept, position,empcode.
I have tried few DAX, but nothing is working.
Your help is much appretiated.
Many thanks,
Meena
Solved! Go to Solution.
Another community member could probably improve on this, but I did this by changing the grain of the table, i.e. removing the qualification column and consolidating the duplicates. You can do this in a separate table by referencing the query in Query Editor.
Then you can add in the measure:
Total Departmental Salary = CALCULATE ( SUM ( Salaries[Salary] ), ALLEXCEPT ( Salaries, Salaries[Dept] ) )
Table = SUMMARIZE ( EmpSalary, EmpSalary[Dept], EmpSalary[empcode], EmpSalary[Position], "TotalSal", DISTINCT ( EmpSalary[salary] ) )
Hai Meena.,
Please try this....
Another community member could probably improve on this, but I did this by changing the grain of the table, i.e. removing the qualification column and consolidating the duplicates. You can do this in a separate table by referencing the query in Query Editor.
Then you can add in the measure:
Total Departmental Salary = CALCULATE ( SUM ( Salaries[Salary] ), ALLEXCEPT ( Salaries, Salaries[Dept] ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
73 | |
57 | |
38 | |
35 |
User | Count |
---|---|
83 | |
68 | |
59 | |
46 | |
45 |