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
maria_fernanda
Frequent Visitor

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

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.