Forum Discussion

MintuBaruah's avatar
MintuBaruah
Helper III
5 years ago
Solved

Time Series

Hello All,   I have the data as shown in Table 1:  Table1: Time   Date   Balance 07:03:00 PM   4/27/2021   30142.78 06:28:00 PM   4/27/2021   33710.19 08:50:00 PM   4/14...
  • amitchandak's avatar
    5 years ago

    MintuBaruah , Try two measures like

     

    Bal-Start of day= firstnonblankvalue(Table[time], min(Table[Balance]))

    Bal-End of day = lastnonblankvalue(Table[time], min(Table[Balance]))

  • v-yalanwu-msft's avatar
    5 years ago

    Hi, MintuBaruah ;

    You also could create a measure as follows:

    Start =
    VAR _min =CALCULATE ( MIN ( [Time] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    RETURN
        CALCULATE (MIN ( [Balance] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[Date] ), [Time] = _min ))
    End =
    VAR _max =CALCULATE ( MAX ( [Time] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    RETURN
        CALCULATE (
            MIN ( [Balance] ),
            FILTER ( ALLEXCEPT ( 'Table', 'Table'[Date] ), [Time] = _max ))

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.