Forum Discussion
Asim
Helper I
8 years agoCalculated column to measure
Good Morning, Is it possible to change below mentioned calculated column to measure as this calculated column consume alot of memory and when my table rows reach to 20k then i got not enough memory ...
Zubair_Muhammad
Community Champion
8 years agoHi Asim
Try this as a MEASURE
Setup Count =
VAR PreviousDate =
CALCULATE (
MAX ( EventLog[Date] ),
FILTER (
ALLEXCEPT ( EventLog, EventLog[Machine] ),
EventLog[Event] = "setup"
&& EventLog[Date] < SELECTEDVALUE ( EventLog[Date] )
)
)
VAR PreviousMaterial =
CALCULATE (
FIRSTNONBLANK ( EventLog[Semi.Mat.No.], 1 ),
FILTER (
ALLEXCEPT ( EventLog, EventLog[Machine] ),
EventLog[Event] = "setup"
&& EventLog[Date] = PreviousDate
)
)
RETURN
IF ( SELECTEDVALUE ( EventLog[Semi.Mat.No.] ) = PreviousMaterial, BLANK (), 1 )