Forum Discussion
percent change by rows
- 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.
gaikwadaa123 , Try a new measure like
sum(Table[Diff])- calculate(sum(Table[Diff]), filter(Table, Table[Date] = max(Table[Date]) && Table[hour] = max(Table[hour]]) -1 ))
I am looking for the precentage change which should include devide statement. With your formula i can see result like below
It is calculating same result for all rows. I want to see the percentage change for value column by each hour.
Can you modify and check ?
- gaikwadaa1234 years ago
Helper II
Did you check my reply?
Can you help me?
- Icey4 years ago
Community Support
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.
- Icey4 years ago
Community Support
- gaikwadaa1234 years ago
Helper II
thank you it worked. I am looking for another same issue,
I have two tables Difference and history ,
I would like to calculate the difference between Difference(actual) and History(value) colums based on the Hours and rate area.
Here is the screenshot: