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
YunJ
Post Prodigy
Post Prodigy

Cómo ordenar la columna de fecha (tienen el mismo valor)

Hola

Me pregunto si hay algún método para ordenar la columna "Intervalo de fechas"?

Por favor, encuentre el archivo pbix:

https://www.dropbox.com/s/s9da9ce3jimw1ko/Date.pbix?dl=0

Capture2.PNG

Capture.PNG

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hola @YunJ ,

Reemplazaría esa columna por otra ver los siguientes códigos para la consulta DAX y Power:

Power Query:

Date.ToText([Start], "yyyy/MM/dd") & "-" &Date.ToText([End], "yyyy/MM/dd")

Dax:

FORMAT(Sheet2[Start];"yyyy/mm/dd") & "-"&FORMAT(Sheet2[End];"yyyy/mm/dd")

Esto le dará las fechas con dos dígitos en mes y día por lo que el pedido debe ser correcto.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hola @YunJ ,

Por favor, intente así:

Rank Start = RANKX(Sheet2,Sheet2[Start],,ASC,Skip)

1.gif

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

5 REPLIES 5
MFelix
Super User
Super User

Hola @YunJ ,

Reemplazaría esa columna por otra ver los siguientes códigos para la consulta DAX y Power:

Power Query:

Date.ToText([Start], "yyyy/MM/dd") & "-" &Date.ToText([End], "yyyy/MM/dd")

Dax:

FORMAT(Sheet2[Start];"yyyy/mm/dd") & "-"&FORMAT(Sheet2[End];"yyyy/mm/dd")

Esto le dará las fechas con dos dígitos en mes y día por lo que el pedido debe ser correcto.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hola @MFelix

Escribí el DAX de la siguiente manera:

Capture.PNGCapture2.PNG

Pero el orden del eje X no está en la ordenación correcta.

Gracias por su tiempo.

Hola @YunJ ,

Por favor, intente así:

Rank Start = RANKX(Sheet2,Sheet2[Start],,ASC,Skip)

1.gif

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.

Hola @YunJ,

Usted necesita tener dos dígitos en el día y el mes con el fin de obtener 01-01 de lo contrario el pedido será incorrecto cambiar su formato de M / D a MM / DD debe hacer el truco


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hola @MFelix Muchas gracias por su solución!

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.

Top Solution Authors