Forum Discussion
Calculated 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 error.
Is there anyone who can help please.
Regards
Asim
Setup Count =
VAR PreviousDate =
CALCULATE (
MAX ( EventLog[Date] ),
FILTER (
ALLEXCEPT ( EventLog, EventLog[Machine] ),
EventLog[Event] = "setup"
&& EventLog[Date] < EARLIER ( EventLog[Date] )
)
)
VAR PreviousMaterial =
CALCULATE (
FIRSTNONBLANK ( EventLog[Semi.Mat.No.], 1 ),
FILTER (
ALLEXCEPT ( EventLog, EventLog[Machine] ),
EventLog[Event] = "setup"
&& EventLog[Date] = PreviousDate
)
)
RETURN
IF ( EventLog[Semi.Mat.No.] = PreviousMaterial, BLANK(), 1 )
2 Replies
- Zubair_Muhammad
Community Champion
Hi 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 ) - v-huizhn-msft
Microsoft Employee
Hi Asim,
Have you resolved your issue? If you have, please mark the reply as answer if you think it's useful. More people will learn new things here. If you haven't, please feel free to ask.
Thanks