Forum Discussion

jitpbi's avatar
jitpbi
Icon for Post Patron rankPost Patron
5 years ago
Solved

Slicer on DateTime field

Hi,   Is there any workaround possible to use both date and time when the type of slicer is Between? Using visual/page level filter or filter at service is not preferable at all.   Thanks
  • Anonymous's avatar
    Anonymous
    5 years ago

    hi jitpbi - You can try  the below approach

     

    1. I extracted the minutes from the Date time field 

    Mins = MINUTE('Z-DateTime-Sort'[DateTime])
     
    2. Created a Hour-Mins column
    Hour-Mins = 'Z-DateTime-Sort'[Hour] + DIVIDE('Z-DateTime-Sort'[Mins], 60)
     

     

    3. Use the Hour-Mins column in the slicer - it would display time as "hh:mm" but more in the format displayed below

    Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!