- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Promedio ocupación por fechas y centros
Hola a tod@s,
Necesito calcular el promedio de ocupación de una serie de centros teniendo por fecha filtrada. Es decir, necesito saber la ocupación media por centro contando el número de días que he filtrado.
centro_ekon | fecha | ocupacion_real |
Centro 1 | 01/01/2023 | 32 |
Centro 1 | 01/01/2023 | 15 |
Centro 1 | 01/01/2023 | 10 |
Centro 1 | 01/02/2023 | 32 |
Centro 1 | 01/02/2023 | 14 |
Centro 2 | 01/01/2023 | 14 |
Centro 2 | 01/01/2023 | dieciséis |
Centro 2 | 01/02/2023 | 10 |
Centro 2 | 01/02/2023 | 9 |
Centro 2 | 01/03/2023 | 10 |
Centro 2 | 01/03/2023 | 8 |
No sé si con la función valor promedio podría hacerse o hay otra forma con divide sumx, nº de días inicio y fin
Agradecería mucha la ayuda. un saludo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Leoca90 ,
Please try this measure:
average occupancy =
DIVIDE (
SUMX (
SUMMARIZE (
'Table',
'Table'[centro_ekon],
'Table'[fecha],
"average",
CALCULATE (
AVERAGE ( 'Table'[ocupacion_real] ),
'Table'[fecha] = EARLIER ( 'Table'[fecha] )
)
),
[average]
),
COUNTROWS ( 'Calendar' )
)
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

what would be the expected result based on your sample data?

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-25-2024 04:15 PM | |||
12-20-2023 08:08 AM | |||
07-01-2023 03:16 PM | |||
02-08-2024 04:10 PM | |||
01-15-2025 06:44 AM |
User | Count |
---|---|
25 | |
10 | |
9 | |
9 | |
8 |