cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Measure does not add up in matrix visual

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?

Jaap

1 ACCEPTED SOLUTION
Solution Specialist

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])    )))`
2 REPLIES 2
Frequent Visitor

Thanks a lot @HoangHugo !!

Solution Specialist

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])    )))`

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.