The present invention relates to a compound represented by formula (I), which has a GPR120 agonist action and thus is useful for treatment of diabetes mellitus or hyperlipidemia, or a pharmaceutically acceptable salt thereof. In the formula, (AA) represents a phenyl or the like, which may be substituted with a lower alkoxy group or the like (BB) represents a divalent group or the like, derived by removal of two hydrogen atoms from a benzene which may be substituted with a halogen atom or the like X represents a spacer having a main chain composed of 1-8 carbon atoms wherein 1-3 carbon atoms in the main chain may be substituted with an oxygen atom or the like and Y represents a hydrogen atom or the like.