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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.