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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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