Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi there,
I would like to calculate the total amount of contract hours per filtered time period. The following table is connected to an employee table, which in turn, is connected to other tables.
I have created a calculated column that computes the contract hours per day (ContractUrenPerDag). Furthermore, I have created the following measure that should compute the contract hours per filtered time period:
ContractHours =
CALCULATE(
SUM(Contracten[ContractUrenPerDag]),
FILTER(
Contracten,
Contracten[StartDatum] <= FIRSTDATE(Kalender[Datum])
&& Contracten[EindDatum] >= LASTDATE(Kalender[Datum])
)
)
However, when visualizing the results in a matrix table, the ContractHours measure total does not add up correctly. Besides, in week 5 it computes a blank value.
The date table is not connected to the contract hours table.
Does anyone have a sollution for this problem?
Thanks in advance,
Jaap
Solved! Go to Solution.
Hi, to sum up value within rows, try this one
ContractHours =
SUMX(SUMMARIZE (Datum column),
CALCULATE(
SUM(Contracten[ContractUrenPerDag]),
FILTER(
Contracten,
Contracten[StartDatum] <= FIRSTDATE(Kalender[Datum])
&& Contracten[EindDatum] >= LASTDATE(Kalender[Datum])
)
))
Hi, to sum up value within rows, try this one
ContractHours =
SUMX(SUMMARIZE (Datum column),
CALCULATE(
SUM(Contracten[ContractUrenPerDag]),
FILTER(
Contracten,
Contracten[StartDatum] <= FIRSTDATE(Kalender[Datum])
&& Contracten[EindDatum] >= LASTDATE(Kalender[Datum])
)
))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
84 | |
66 | |
49 |
User | Count |
---|---|
127 | |
109 | |
93 | |
70 | |
67 |