Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create a trend graph with date and time

Hi   I have a table A0 that has the following structure and sample values: Date Time Username 3/11/2022 7:19:16 AM abc 3/13/2022 11:20:56 PM xyx 3/13/2022 12:25:44 PM fff  ...
  • v-zhangti's avatar
    v-zhangti
    4 years ago

    Hi Anonymous ,

     

    You can try the following methods.

    Column:

    Time Interval = 
    IF ( HOUR ( [Time] ) >= 12, HOUR ( [Time] ) - 12, HOUR ( [Time] ) ) & "-"
        & IF ( HOUR ( [Time] ) >= 12, HOUR ( [Time] ) - 12 + 1, HOUR ( [Time] ) + 1 )
        & IF ( HOUR ( [Time] ) >= 12, "PM", "AM" )
    Username (#) =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( 'Table', 'Table'[Time Interval] = EARLIER ( 'Table'[Time Interval] ) )
    )
    

    Index is only used for sorting.

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.