[Problem] To provide a GPR40 activating agent having as an active ingredient a novel compound having a GPR40 agonist action, or a salt thereof, a solvate of the compound or salt, or the like; in particular, an insulin secretagogue or an agent for preventing and/or treating diabetes, obesity, or the like. [Solution] A compound represented by formula (III) [Chemical formula 1] (in the formula, f is 0-2; g is 1-4; j is 0-3; k is 0-2; n is 0-2; p is 0-4; h is 0-3; q1 is 0-3; q2 is 0 or 1; r1 is 0-2 (where q1+q2+r1 is 0-5); J