grease the inside of a 9x11 baking dish with the butter and set aside. heat oven to 375 degrees.
remove the tough outer section of the fennel and its core. thinly slice the bulb. peel and thinly slice the potatoes.
layer the potatoes in the baking dish, alternating sweet potato, yukon gold and fennel. sprinkle the shallot, thyme and salt and pepper with every layer. pour cream over the top so that it just covers the vegetables.
bake for 45 minutes. sprinkle the parmesan over top and bake another 15 minutes. the gratin should be bubbling and nicely browned.