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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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