Forum Discussion
Anonymous
5 years agoNot applicable
data not refreshing
hallo Everyone, I have big data. Two tables each with more than 1,500,000 rows and will keep expanding. Everything was working well untill I added a calculated column in on of the tables (below...
mahoneypat
5 years agoMicrosoft Employee
Please try this expression instead. It would also be better to split your datetime column to date and time columns (or just convert to date if you don't need your time component); that will help the performance of your model overall.
NewColumn =
VAR vThisID = Table[ID]
VAR vThisDateTime = Table[Datetime]
VAR vPrevDatetime =
CALCULATE (
MAX ( table[datetime] ),
Table[ID] = vThisID,
Table[Datetime] < vThisDateTime
)
VAR result =
CALCULATE (
MAX ( table[Value] ),
Table[ID] = vThisID,
Table[Datetime] = vPrevDatetime
)
RETURN
IF ( ISBLANK ( vPrevDateTime ), Table[Value], result )
Pat