The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello dear members.
I have a table with the following information:
Division Department Job Position Employee Payroll Cost
IT IT SUPPORT BUSINESS ANALYST EMPLOYEE1 1000
IT IT SOFTWARE ENGINEER EMPLOYEE2 1200
HR HR RECRUITER EMPLOYEE3 1000
HR HR RECRUITER EMPLOYEE4 1000
I have created also a table with all the employees and all the percentages from 1%-100% per employee
And i have created the following measure:
VAR LastNonZeroDate =
CALCULATE (MAX ( Table1[PERIOD_WID]),
FILTER ( Table1, Table1 [Salary] <> 0 ), filter(Table1, Table1 [Employee_ID] = SELECTEDVALUE('Percentage - Name'[Employee_ID])))
return
IF(distinctCOUNT('Percentage - Name'[Percentages.Percentage])>1, CALCULATE(SUM(Table1 [Salary]) , Table1 [PERIOD_WID]=LastNonZeroDate), IFERROR( CALCULATE(SUM(Table1 [Salary]), Table1 [PERIOD_WID]=LastNonZeroDate)*(1+MAX('Percentage - Name'[Percentages.Percentage])),BLANK()))
The idea is the user to choose from a slicer the person and the percentage and the salary to increase accordingly
The desirebale table:
Division Department Job Position Employee Payroll Cost Percentage New Cost
IT IT SUPPORT BUSINESS ANALYST EMPLOYEE1 1000 5% 1050
IT IT SOFTWARE ENGINEER EMPLOYEE2 1200 10% 1320
HR HR RECRUITER EMPLOYEE3 1000 5% 1050
HR HR RECRUITER EMPLOYEE4 1000 10% 1100
The measures works fine but the column new cost totals are blank.
I have tried to wrap it in summarize and sumx but the problem remains. I suppose there is a problem with my formula.
Can you please help me out??
Solved! Go to Solution.
Ok, i managed to resolve the problem with the totals that wasn't showing. I removed a filter. But now i have another problem with totals.
I Fixed it and i am writting the solution in case someone else need it.
I created a suumerized table
Ok, i managed to resolve the problem with the totals that wasn't showing. I removed a filter. But now i have another problem with totals.
User | Count |
---|---|
26 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
30 | |
14 | |
12 | |
12 | |
7 |