This can write in simpler way
Then drag to row self and take sum
Garima's suggestion is a good one. Another option wouldn't even involve a calculation. Drag the [Number of Records] field into your view, then drag the [EventType - Error/Event] field onto your filters shelf and filter for Error only.
Alternatively, you could drag the field to your rows/columns shelf to have a side by side comparison of Events vs. Errors.
Hi Drag the event type into row and drag no of records into text.
if [EventType - Error/Event]= 'Error' THEN 1 ELSE 0 END