Reputation: 1
In this dataset I am trying to develop a column or a measure based upon the hours column. I am trying to determine the difference between the first and second hour rows, the second and third hour rows, etc. and all the way through the entirety of the data.
Note: there are multiple serial numbers in this table; I just used this serial as an example.
Upvotes: 0
Views: 579
Reputation: 1231
I'm not sure this should be tagged with SQL-Server
unless you can change the SQL that sources the data. If so you could pre-calculate this inside SQL Server.
If you can change the Power Query that brings the data into the data model you can add an Index column as the data's coming in and use that.
Please see: How to Compare the Current Row to the Previous Row Using DAX
Upvotes: 1