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 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])
)
))
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 |
---|---|
67 | |
61 | |
52 | |
36 | |
36 |
User | Count |
---|---|
84 | |
74 | |
56 | |
45 | |
44 |