admin管理员组文章数量:1387460
I've created a matrix table calculated from 3 tables and a Date Table. These tables are TimeRecord, EmployeeSalary and InternalExpense. The datasoureces are MS excel.
- TimeRecored -> This table contains employee time tracking for each task, contains Column ID,Name, Date, Task, ProjectCode,Time(decimal).
- EmployeeSalary -> This table record salary of each employee in each month.
- InternalExpense -> This table record expenses with company in each month.
After created for ID and Date relationship in those model. I've create some measure to summary each Project Cost by Employee's salary x the ratio of time each employee spend on each project and this time ratio also calculate with total monthly expense to distribute this cost in the projects cost. Here are my measures.
1. TimeRatio = DIVIDE(
SUM('TimeRecord'[Time]),
CALCULATE(SUM('TimeRecord'[Time]),
ALL('TimeTracking'[Project])
)
)
SalaryXWorkRatio = ([WorkingRatio]*SELECTEDVALUE(Salary[Salary]))
ALLExpense = SUM(Expense[Cost])
ProjectExpense = [AllExpense]*[WorkingRatio]
SumSalaryWorkRatio = SUMX(VALUES(Clockify[Project]),
CALCULATE(SUMX(VALUES(Clockify[Code]),[SalaryXWorkRatio])))
ProjectTotalCost = [SumSalaryWorkRatio]+[ProjectExpense]
Here's my expected result. enter image description here
But its work for some months, when i filter cost in Jan, Mar, May, Aug, Oct. The Expense column not show any value in rows but show correct value in total. like this. while the Total cost column missing calculation with expense cost too. enter image description here
What should i do? I guess it was my measure that not specific some condition in detail. But I still don't understand why the value missing in some months. Could you please suggest me if i need to revised my measure, change it or check anything . Thank you.
I've created a matrix table calculated from 3 tables and a Date Table. These tables are TimeRecord, EmployeeSalary and InternalExpense. The datasoureces are MS excel.
- TimeRecored -> This table contains employee time tracking for each task, contains Column ID,Name, Date, Task, ProjectCode,Time(decimal).
- EmployeeSalary -> This table record salary of each employee in each month.
- InternalExpense -> This table record expenses with company in each month.
After created for ID and Date relationship in those model. I've create some measure to summary each Project Cost by Employee's salary x the ratio of time each employee spend on each project and this time ratio also calculate with total monthly expense to distribute this cost in the projects cost. Here are my measures.
1. TimeRatio = DIVIDE(
SUM('TimeRecord'[Time]),
CALCULATE(SUM('TimeRecord'[Time]),
ALL('TimeTracking'[Project])
)
)
SalaryXWorkRatio = ([WorkingRatio]*SELECTEDVALUE(Salary[Salary]))
ALLExpense = SUM(Expense[Cost])
ProjectExpense = [AllExpense]*[WorkingRatio]
SumSalaryWorkRatio = SUMX(VALUES(Clockify[Project]),
CALCULATE(SUMX(VALUES(Clockify[Code]),[SalaryXWorkRatio])))
ProjectTotalCost = [SumSalaryWorkRatio]+[ProjectExpense]
Here's my expected result. enter image description here
But its work for some months, when i filter cost in Jan, Mar, May, Aug, Oct. The Expense column not show any value in rows but show correct value in total. like this. while the Total cost column missing calculation with expense cost too. enter image description here
What should i do? I guess it was my measure that not specific some condition in detail. But I still don't understand why the value missing in some months. Could you please suggest me if i need to revised my measure, change it or check anything . Thank you.
Share Improve this question asked Mar 17 at 7:20 FebbFebb 12 bronze badges 01 Answer
Reset to default 0I already fixed this problem. It's due to my tables relationship between TimeRecord[Date] and Datetable[Date] (Many to one). This relationship cross-filter direction was "Single". So i managed relationship in the tables and change this to "Both-way". Then my table back to normal as i expected.
本文标签: daxPowerBITotal is correct but rows are missing in some monthStack Overflow
版权声明:本文标题:dax - PowerBI : Total is correct but rows are missing in some month - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744575694a2613609.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论