Forum Discussion
rbpercussion
3 years agoRegular Visitor
Create a column with rows based on earliest value in another column
I have the below table and want to create a column that has the first value of weight (152.6) for every row. I plan on using this to create another measure that shows % increase decrease over time ...
- 3 years ago
Hi,
Write these calculated column formulas
Date time = Data[Date]+Data[Time]First weight = LOOKUPVALUE(Data[Weight],Data[Date time],CALCULATE(MIN(Data[Date time]),ALL(Data)))Hope this helps.
hummingbird
Helper II
3 years agoHi,
You could try something like this. Although I would suggest linking the "earliestWeight" to "Time" column, so you get the true first value, rather than just the minimum results from the "Weight" column.
Average Weight =
VAR earliestWeight = CALCULATE (
MIN ( 'Table'[Weight] ),
FILTER ( 'Table', 'Table'[Date] = MIN ( 'Table'[Date] ) )
)
RETURN CALCULATE(AVERAGE( 'Table'[Weight]), ALLEXCEPT('Table','Table'[Date])) / earliestWeight
- hummingbird3 years ago
Helper II
rbpercussion Does that answer your question? Mark it as a solution!