Forum Discussion
isidnis
7 years agoRegular Visitor
Calculate data from absolute measures
Hello, I cannot find a solution for a probably very simple question. I have a table with an absolute measure of a utility counter with the timestamp when it was measured e.g The key is that ...
isidnis
7 years agoRegular Visitor
Thanks for your help. Probably out of my skill set to do linear interpolation on power query. I have been able to get a table with only one measure per day but not sure how to get a column that has the incremental value on power query. I have been able to do it with a measure.
Anonymous
7 years agoNot applicable
The way to do it in PQ is this. Let's say you have a day a with a read of A and day b with a read of B (A<B) and there are no other days between a and b. Hence, there are n=(b-a) days altogether you're looking at (we assume that the day on which a read is taken belongs to the right interval: [a0, a1), [a2, a3)...). So you have to now create n, a=a0, a1,...,a(n-1)=b-1, days and allocate to them in a linear fashion the consumption of B-A. Each day will have a consumption of (B-A)/n and this is the linear interpolation I was talking about. Now, this procedure must be carried out for each and every pair of consecutive days.
Best
D.
Best
D.