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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply

dividir mi hora en 3 turnos

Hola comunidad terngo un problema.
tengo una columna de hora y eso lo necesito poner en 3 turnos
turno uno es de 7:00am a 3:00pm
turno dos es de 3:00pm a 10:00pm
turno tres es de 10:00pm a 7:00am
podrían ayudarme cvon la condificon o orientarme como es porfvor

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

Hi @Ahmedx @maria_fernanda ,

@Ahmedx The DAX side you provided seems to be misspelled here:

vjunyantmsft_0-1712019903418.png

It should be 

TIME(23,59,59)

?

Best Regards,
Dino Tao 

View solution in original post

10 REPLIES 10
jmarciogsousa
Frequent Visitor

Turno = 
if(

    [hour] >= "07:00" && [hour] < "15:00", "turno 1",
    if([hour] >= "15:00" && [hour] < "22:00", "turno 2",
    if([hour] >= "22:00" && [hour] < "07:00", "turno 3",BLANK()
)))
Ahmedx
Super User
Super User

pls try this

Screenshot_1.png

ESTA ES LA SOLUCION CORRECTA YA VALIDE LA INFOMACION Y ES CORRECTA MUCHAS GRACIAS 

 

Hi @Ahmedx @maria_fernanda ,

@Ahmedx The DAX side you provided seems to be misspelled here:

vjunyantmsft_0-1712019903418.png

It should be 

TIME(23,59,59)

?

Best Regards,
Dino Tao 

MUCHAS GRACIAS DE ECHO ERA ESE PROBLEMA 

 

por que en el horaro de las 11 no me toma ningun turno ?

maria_fernanda_0-1711989246517.png

 

Share sample pbix file to help you.

jmarciogsousa
Frequent Visitor

Try, create new column

Turno = 
if(

    [hour] >= "07:00" && [hour] < "15:00", "turno 1",
    [hour] >= "15:00" && [hour] < "22:00", "turno 2",
    [hour] >= "22:00" && [hour] < "07:00", "turno 3",BLANK()
)

 

maria_fernanda_0-1711986436325.png

me aparece este error 

Turno = 
if(

    [hour] >= "07:00" && [hour] < "15:00", "turno 1",
    if([hour] >= "15:00" && [hour] < "22:00", "turno 2",
    if([hour] >= "22:00" && [hour] < "07:00", "turno 3",BLANK()
)))

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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