Forum Discussion
Anonymous
7 years agoNot applicable
not enough memory for a specific column?
Hey, I am having some trouble with an equation, I have a column of data for TotalEnergy, and this column accumulates all the energy in total for different devices, and I wanna make a column for ...
Anonymous
7 years agoNot applicable
I have tried this formula as well, and I am trying to change Index to Rank, but I am not getting correct values.
NewEnergyPerDay_kWh =
var maxIndex =CALCULATE( MAX('Data'[Index]), FILTER('Data','Data'[Index]=EARLIER('Data'[Index])), ALLEXCEPT(Data,Data[Device]))
VAR minVal='Data'[TotalEnergy_kWh]
var maxVal= IF('Data'[Index]=maxIndex,
LOOKUPVALUE('Data'[TotalEnergy_kWh],'Data'[Index],'Data'[Index]),
LOOKUPVALUE('Data'[TotalEnergy_kWh],'Data'[Index],'Data'[Index]+1))
RETURN
CALCULATE(DIVIDE(minVal-maxVal,1,0),FILTER('Data','Data'[Index]=EARLIER('Data'[Index])), ALLEXCEPT(Data,Data[Device]))