First, I assume you have one or more segments captured from MIDI performance. Of course the performance notes don't match the beats and bar lines. Fit main → Existing Beats to Beat Segment or main → Set Tempos from Beat Segment can fit it, but either one needs a beat track. A beat track is a track consisting of one note for each beat.
Select the first two notes that match beats, and then Notation → edit → Guess Beats will select following notes that it thinks match beats. It will follow ritardandos and accelerandos and add notes where they are totally missing. Eventually it loses track of beats, like after 8 or 10 measures, but it still does a lot of work automatically for you.