Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Agregación multinivel mediante DAX

Hola

He encontrado un problema al escribir una medida DAX.

Mi diseño:
- Una tabla de hechos

- Una dimensión de fecha (granularidad: día)

- Una dimensión de tiempo (tiene enteros de hora y enteros de minuto - sólo para cuartos (0, 15, 30, 45)

Lo que quiero lograr:

- Forzar tabular a siempre PROMEDIO mi medida de intervalos de 15 minutos a una hora.

- Forzar tabular a siempre SUMA los promedios de la primera viñeta.

- Esto tiene que funcionar incluso cuando las dimensiones de hora / fecha no se utilizan en la tabla dinámica / PBI.

Supongamos que así es como se ven los datos con la granularidad más baja (sin embargo, hay más dimensiones):

lowest granularity.PNG

Así es como debe verse como un nivel más alto - no más minutos:

hourly granularity.PNG

Así es como debería verse si eliminamos la dimensión Time:

daily granularity.PNG

Y si elimino la dimensión Fecha:

customer granularity.PNG

Y si no uso ninguna cota:

highest granularity.PNG


¿Alguien puede ayudarme? ¿Cómo lograr esto en DAX?

Gracias de antemano.

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hola @boriz

Puede probar a continuación la siguiente medida:

Test á
SUMX (
    SUMMARIZE (
        Table1, Table1[Dim Customer],
        Table1[Dim Date],
        Table1[Dim Time-Hour]
    ), SUM (
    Table1[Value] ) / COUNT ( Table1[Dim Time-Hour]
) )

1.png

saludos

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-cherch-msft
Employee
Employee

Hola @boriz

Puede probar a continuación la siguiente medida:

Test á
SUMX (
    SUMMARIZE (
        Table1, Table1[Dim Customer],
        Table1[Dim Date],
        Table1[Dim Time-Hour]
    ), SUM (
    Table1[Value] ) / COUNT ( Table1[Dim Time-Hour]
) )

1.png

saludos

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
GilbertQ
Super User
Super User

Hola

¿Qué medidas ha tratado de hacer para que esto funcione?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.