Preheat your oven to 375°F (190°C) and grease a 9x13-inch baking dish.
In a medium bowl, whisk together 2 cups of flour, 1/2 cup of sugar, baking powder, and salt.
Cut in the butter until the mixture resembles coarse crumbs. Stir in the egg to form a dough.
Press half of the dough into the prepared baking dish.
In another bowl, mix cranberries with the remaining 1/2 cup of sugar, cornstarch, and lemon juice. Spread the cranberry mixture over the crust in the dish.
Crumble the remaining dough over the cranberry layer.
Bake for 35 minutes, or until the top is golden brown. Let it cool before serving.