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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Los mejores artistas filtran el año actual (HOY)

Hola

He intentado modificar el script DAX a continuación a"Filtrar año actual"tiempos de servidor, pero no hay suerte. El código funciona muy bien, pero sin el filtrado en el lugar simplemente no estoy recibiendo los resultados deseados Sé que me estoy perdiendo algo simple simplemente No estoy seguro de qué o a dónde ir a continuación.

¿Hay que filtrar "Año 2020" en el código DAX que se enumera a continuación?

Su ayuda y orientación serán muy apreciadas.

Gracias

Top Service = 
VAR temp_table =
    SUMMARIZE (
        ALL ( CROutages[Service] ),
        CROutages[Service],
        "SericeTotalValue", COUNTA( CROutages[IDkey] )    
    )
RETURN
    CALCULATE (
        MAX ( CROutages[Service] ),
        FILTER (
            ADDCOLUMNS ( temp_table, "Rank", RANKX ( temp_table, [SericeTotalValue] ) ),
            [Rank] = 1
        )
 
    )

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@dcg38524

Prueba algo como esto:

Top Service = 
VAR temp_table =
    SUMMARIZE (
        ALL ( CROutages[Service] ),
        CROutages[Service],
        "SericeTotalValue", COUNTA( CROutages[IDkey] )    
    )
RETURN
    CALCULATE (
        MAX ( CROutages[Service] ),
        FILTER (
            ADDCOLUMNS ( temp_table, "Rank", RANKX ( temp_table, [SericeTotalValue] ) ),
            [Rank] = 1
        ), FILTER(CROutages,CROutages[Date].[Year] = 2020)
    )


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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@dcg38524

Prueba algo como esto:

Top Service = 
VAR temp_table =
    SUMMARIZE (
        ALL ( CROutages[Service] ),
        CROutages[Service],
        "SericeTotalValue", COUNTA( CROutages[IDkey] )    
    )
RETURN
    CALCULATE (
        MAX ( CROutages[Service] ),
        FILTER (
            ADDCOLUMNS ( temp_table, "Rank", RANKX ( temp_table, [SericeTotalValue] ) ),
            [Rank] = 1
        ), FILTER(CROutages,CROutages[Date].[Year] = 2020)
    )


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

Anonymous
Not applicable

Gracias Paul, apreciamos su ayuda y por responsing tan rápidamente su solución funcionó muy bien 😀.

Saludos

Don

amitchandak
Super User
Super User

@dcg38524, Lo mejor que puedo pensar.

Top Service = 
VAR temp_table =
    SUMMARIZE (
        filter(ALL ( CROutages[Service] ),year(CROutages[Date])=Year(today())),
        CROutages[Service],
        "SericeTotalValue", COUNTA( CROutages[IDkey] )    
    )
RETURN
    CALCULATE (
        MAX ( CROutages[Service] ),
        FILTER (
            ADDCOLUMNS ( temp_table, "Rank", RANKX ( temp_table, [SericeTotalValue] ) ),
            [Rank] = 1
        )
 
    )

Aprecia tus Felicitaciones.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
TomMartens
Super User
Super User

Hola @dcg38524 ,

puede crear un archivo pbix que contenga algunos datos de ejemplo pero que aún refleje su modelo de datos, cargue el pbix en onedrive o dropbox y comparta el enlace.
Describa el resultado esperado y cómo el filtrado para el año 2020 afectará al resultado.

saludos
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.