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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ermak
Frequent Visitor

Suma para la primera ocurrencia

¡Hola! Por favor, ayúdame a resumir el precio sólo para los primeros hits dentro de las sesiones. Así que ese 3.33 sale, no 16.65.

ermak_0-1600347520852.png

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hola @ermak ,

Podrías probar esta medida.

Sum for the first occurrence =
CALCULATE (
    SUM ( 'Table'[Cost] ),
    FILTER (
        ALL ( 'Table' ),
        [HitID]
            = CALCULATE (
                FIRSTNONBLANK ( 'Table'[HitID], [HitID] ),
                ALLEXCEPT ( 'Table', 'Table'[SessionID] )
            )
    )
)

El resultado es este.

11.png

Puede consultar más detalles desde aquí.

Saludos

Stephen Tao

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hola @ermak ,

Podrías probar esta medida.

Sum for the first occurrence =
CALCULATE (
    SUM ( 'Table'[Cost] ),
    FILTER (
        ALL ( 'Table' ),
        [HitID]
            = CALCULATE (
                FIRSTNONBLANK ( 'Table'[HitID], [HitID] ),
                ALLEXCEPT ( 'Table', 'Table'[SessionID] )
            )
    )
)

El resultado es este.

11.png

Puede consultar más detalles desde aquí.

Saludos

Stephen Tao

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@ermak, asumo que HitId es la sesión mínima que se puede encontrar

calculate( Sum(Table[Cost]), filter( Table,Table[HitId] á min(Table[HitID])), allexcept(Table, Table[SessionID]))

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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