Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
Expand all | Collapse all

Trying to make a date slicer which includes both date and time

  • 1.  Trying to make a date slicer which includes both date and time

    Posted Jul 02, 2022 04:25 PM

    Hi,

    I have a table of a great many datetime, data_point_name, value triplets from process probe sensors. 

    • I want to have a slicer which I can use to pick from time1 on day 1 to time2 on day 2
    • So my approach has been to have three slicers   [Time Start] [Date Slicer] [Time End].   I have the data table and two time tables in 30 minute intervals so I have been able to create measures and display cards to show on the report the start and stop datetime combo.
    • I try to combine all this into a new table using DAX which filters the data table using the measures that I have but have not had any success.

    Does anyone how how to set up a slicer or set of slicers so I can filter my report (for example), from 2022-Jun-15 at 4:30 PM to 2022-Jun-18 at 10:00 AM?

     

    I am just learning about DAX.  I have spent a few hours at this with no success.

     

    Thanks



    ------------------------------
    Stephen Simpson
    ------------------------------


  • 2.  RE: Trying to make a date slicer which includes both date and time

    Posted Jul 04, 2022 04:36 AM
    As you haven't received any good solution yet.....I can offer you a bit of a messy solution?

    It's putting the Date and Time columns in the same hierarchy slicer and setting it as drop down.
    Its a bit of a pain, but you can at least click your way to the desired time frame.

    The sum of events is just

    SumEvents = SUMX('Table','Table'[Event])

    The earliest DateTimeStamp and latest DateTime stamp, you can either set in your visual, or you could add measures

    StartTime = MIN('Table'[DateTimeStamp])
    EndTime = MAX('Table'[DateTimeStamp])





    ------------------------------
    Rebekah Alexander
    Data Analyst
    ------------------------------