Wii U was probably profitable. Not a success like a company like Nintendo needs, a strategic misstep that didn't impact their fortunes significantly. Hardware-wise it was a very direct descendant of the Wii (and gamecube). Relatively low development cost. The games developed for it are being ported to the switch to great success.