Breakdown of Im Joghurt sind Trauben und Kirschen, deshalb schmeckt er süß.
Questions & Answers about Im Joghurt sind Trauben und Kirschen, deshalb schmeckt er süß.
Because in takes the dative when it describes a location.
Here, im Joghurt tells us where the grapes and cherries are: they are in the yogurt. That is a location, so German uses the dative.
Compare:
- im Joghurt = in the yogurt (location → dative)
- in den Joghurt = into the yogurt (direction/movement → accusative)
So in this sentence, dative is used because nothing is moving; it is just describing where the fruit is.