I have $f(x,y)\geq 0$ measurable in $\mathcal{A}\times\mathcal{B}$ where $(X,\mathcal{A})$ and $(Y,\mathcal{B})$ are measurable spaces.
I don't think $g(x)=\sup_{y\in Y}f(x,y)$ is measurable in $\mathcal{A}$ if $g(x)<\infty$ for each $x\in X$.
My thought comes from the fact that one of sufficient conditions to make a supremum in $y\in Y$ be measurable if $Y$ is countable so there is a counterexample if I set $Y$ be uncountable to make $g(x)$ be not measurable.
But I can't not do further. Please help me to construct the counterexample of $g(x)$.