Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need to accumulate "Hours" from the Detail table and reset by months.
I've created the month column based on the date and sorted by Date from lowest to highest
Mes = MONTH([Fecha])
I have used the following measure:
Acumulado =
CALCULATE(
SUM('Detalle'[Horas]),
FILTER(
ALLSELECTED('Detalle'[identificador]),
ISONORAFTER('Detalle'[identificador], MAX('Detalle'[identificador]), DESC)
)
)
It accumulates well, but I don't know how to indicate that I reset the accumulated when I changed the month.
Solved! Go to Solution.
I've solved it as follows:
Acumulado =
CALCULATE (
SUM ( 'Detalle'[Horas] ),
FILTER (
ALLSELECTED ( 'Detalle' ),
'Detalle'[identificador] <= MAX ( 'Detalle'[identificador] )
&& 'Detalle'[Mes] = MAX ( 'Detalle'[Mes]
)
))
I've solved it as follows:
Acumulado =
CALCULATE (
SUM ( 'Detalle'[Horas] ),
FILTER (
ALLSELECTED ( 'Detalle' ),
'Detalle'[identificador] <= MAX ( 'Detalle'[identificador] )
&& 'Detalle'[Mes] = MAX ( 'Detalle'[Mes]
)
))
User | Count |
---|---|
88 | |
72 | |
68 | |
64 | |
54 |
User | Count |
---|---|
98 | |
91 | |
74 | |
68 | |
63 |