Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
Good day,
I would like to know the count of my semi material number is material is getting change, if not then i want to have 0 in column or measure.
I am using below mentioned dax formula in my calculated column to evalute the results but it is not working for some unknown reason.
Is there any one help me out from this situation.
Best Regards
Asim
Count = IF(
CALCULATE(
COUNTA(Eventlog[Machine_Material]),
FILTER(
Eventlog,
Eventlog[Date] > EARLIER(Eventlog[Date])
&& Eventlog[Semi.Mat.No.] <> EARLIER(Eventlog[Semi.Mat.No.])
)
) > 1,
0,
1
)
Solved! Go to Solution.
Try this calculated column
Column = 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, 0, 1 )
Hi @Asim
Try this MEASURE... I am not sure if it will speed up things
Setup Count Measure = VAR mytable = ADDCOLUMNS ( Eventlog, "Asim", 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 ) ) RETURN COUNTX ( FILTER ( mytable, [Asim] = 1 ), 1 )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |