Forum Discussion

gaikwadaa123's avatar
gaikwadaa123
Icon for Helper II rankHelper II
4 years ago
Solved

percent change by rows

Hello, I need urgent help.   I have below table  I would like to calculate the percent change of the 'Value' column for each Hour.  So that 0 hour will have 0 as percent change  always and ...
  • Icey's avatar
    Icey
    4 years ago

    Hi gaikwadaa123 ,

     

    Please create it as a calculated measure, not a calculated column.

     

    If you want to create a calculated column, try this:

     

    Column =
    Table[Diff]
        - CALCULATE (
            SUM ( Table[Diff] ),
            FILTER (
                Table,
                Table[MeasurementName] = EARLIER ( Table[MeasurementName] )
                    && Table[Date] = EARLIER ( Table[Date] )
                    && Table[hour]
                        = EARLIER ( Table[hour] ) - 1
            )
        )
    
    

     

     

    Best Regards,

    Icey

     

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