Forum Discussion

SSBkrish's avatar
SSBkrish
Regular Visitor
1 year ago
Solved

Auto change once shift changes

Hi Experties,

I wouldlike to set auto change option once 1st shift completed it should start showing 2nd shift data.
Ex : 1st shift is 6AM to 12 PM 
       2nd shift is 12 PM to 6PM.

 

When the 1st shift ends @ 11:59 AM and 2nd shift start from 12PM. 1st shift data should show when time is (6AM to11:59AM) when time is 12PM it should automatically should show the 2nd shift data in the visuals (Dashboard)
Any help here would be appreciated.
Thanks in advance

  • hi SSBkrish 

     

    did you have a column in your data which includes values "1st shift / 2nd shift" ?? if so, then you can write a measure as follows:

     

    Measure=  var shift_definition =if(HOUR(NOW()) >=6 && HOUR(NOW()) <12 , "1st shift" , if(HOUR(NOW()) >=12 && HOUR(NOW()) <18 , "2nd shift",0))
     return
     if (selectedvalue(your_table [shift]) = shift_definition , 1,0)
     
    and then add this to your visual filter pane and set it to 1 as follows:
     

     

     

    if it doesn't work please provide more details of your table data.

     

    If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

     

4 Replies

  • hi SSBkrish 

     

    did you have a column in your data which includes values "1st shift / 2nd shift" ?? if so, then you can write a measure as follows:

     

    Measure=  var shift_definition =if(HOUR(NOW()) >=6 && HOUR(NOW()) <12 , "1st shift" , if(HOUR(NOW()) >=12 && HOUR(NOW()) <18 , "2nd shift",0))
     return
     if (selectedvalue(your_table [shift]) = shift_definition , 1,0)
     
    and then add this to your visual filter pane and set it to 1 as follows:
     

     

     

    if it doesn't work please provide more details of your table data.

     

    If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

     
      • Selva-Salimi's avatar
        Selva-Salimi
        Solution Sage

        did you define a name for your measure before defining "var"? I mean...

         measure := var shift_definition......