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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
revansh
Helper IV
Helper IV

TABLA DE FECHAS Y HORAS

Hola a todos

¿Podría proporcionar algunas entradas sobre la forma fácil de rellenar filas por hora entre 2 fechas.

Estoy buscando una tabla con 1 columna como abajo.

3/27 01.00

3/27 02.00

3/27 03.00

........

3/27 24.00

3/28 01.00

3/28 02.00

Gracias

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hola @revansh ,

¿Qué tal el resultado después de seguir las sugerencias mencionadas en mi publicación original? ¿Podría proporcionar más detalles al respecto si no cumple con su requisito?


Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hola @revansh ,

Podemos agregar una columna personalizada en Power Query Editor y luego expandirla nuevas filas para satisfacer sus requisitos:

List.DateTimes(
    [Start Date],
    Duration.TotalHours([End Date]-[Start Date]),
    #duration(0,1,0,0)
)

1.jpg2.jpg3.jpg

Todas las consultas están aquí:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIyMDLQNdY1MlcwMLQyMAAiJEELBQMjuKChgVKsTrSSEaomY3RNxgbIJhmaKsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, #"Start Date" = _t, #"End Date" = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Start Date", type datetime}, {"End Date", type datetime}, {"Value", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "DateTime", each List.DateTimes(
    [Start Date],
    Duration.TotalHours([End Date]-[Start Date]),
    #duration(0,1,0,0)
)),
    #"Expanded DateTime" = Table.ExpandListColumn(#"Added Custom", "DateTime")
in
    #"Expanded DateTime"


Si no cumple con su requisito, ¿podría mostrar el resultado exacto esperado basado en las Tablas que hemos compartido?


Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@revansh

Fecha y hora/hora separadas. Crear una tabla de fechas y una hora o una tabla de horas

Fecha: [Fecha y hora]. Fecha

Hora :Hora: [Hora de la fecha]. Hora //O formato([Fecha],"HH:MM:"SS") o formato([Fecha],"HH")

https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-usi...

Para obtener lo mejor de la función de inteligencia de tiempo. Asegúrese de que tiene un calendario de fechas y se ha marcado como la fecha en la vista de modelo. Además, únase a él con la columna de fecha de su hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors