[Problem]To provide a GPR40 activating agent having, as an active ingredient, a novel compound having a GPR40 agonist action, a salt of the compound, a solvate of the salt or the compound, or the like, particularly, an insulin secretagogue and a prophylactic and/or therapeutic agent against diabetes, obesity, or other diseases.[Means of solving the problem]A compound of Formula (I):(where n is 0 to 2; p is 0 to 4; j is 0 to 3; k is 0 to 2; a ring A is an aryl group which is optionally substituted with L or a heterocyclic group which is optionally substituted with L; a ring B is a benzene ring, a pyridine ring, or a pyrimidine ring; X is O, S, —NR7—; and R1 to R7 are specific groups),a salt of the compound, or a solvate of the salt or the compound.