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
leroy773
Helper II
Helper II

Intentar ordenar fechas en la tabla visual con campos de fecha en blanco en la parte inferior

todo

Estoy intentando ordenar una tabla visual basada en fechas en orden ascendente. Pero los campos de fecha en blanco están en la parte superior del tipo. Me gustaría tener campos en blanco en la parte inferior. Cuando ordeno en la consulta, parece correcto. Cualquier comentario será apreciado.

leroy773_0-1598626167051.png

1 ACCEPTED SOLUTION

Hola @leroy773 ,

Podrías intentarlo así:

Measure = 
VAR rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] <> BLANK () ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF ( ISBLANK ( MAX ( 'Table'[Date] ) ), 999, rank_ )

v-xuding-msft_0-1598850698724.png

Best Regards,
Xue Ding
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

3 REPLIES 3
amitchandak
Super User
Super User

@leroy773, cree una columna de ordenación utilizando el rango y cambie el rango uno a un número alto y márquela la columna de ordenación https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Gracias por los comentarios. ¿Cuál es la mejor manera de crear la columna de clasificación de clasificación. Intenté usar rankx, pero eso todavía puso los valores en el orden equivocado.

Hola @leroy773 ,

Podrías intentarlo así:

Measure = 
VAR rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] <> BLANK () ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF ( ISBLANK ( MAX ( 'Table'[Date] ) ), 999, rank_ )

v-xuding-msft_0-1598850698724.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.