Dear B,
Your screenshot is too big/unclear to zoom and get any details ... but in any case. My experience is that while connections can do funny things in PowerAutomate, expressions/actions/calculations always do what they are supposed to.
So, while not 100% guaranteed, there is either something in your data which causes the result or in your flow logic.
I suspect it is the first ... suggest you trace the data throughout your flow.
You do this by adding a Compose action before and after each step with the data you want to see (Mind you, this is sometimes different from the output data from an action, hence the need for the Compose).
Once you trace this data you will find where you go wrong ...
Hope this helps,
Happy flowing,
Koen