Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]
)
))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |