Buildings consume 40% of the energy in industrialized countries. Thus detecting and diagnosing anomalies in the building's energy use is an important problem. The existing approaches either retrieve limited information about the anomaly causes, or are difficult to adapt to different buildings. This paper presents an easily adaptable diagnosis approach that exploits the building's hierarchy of submeters, i. e. information on how much energy is used by the different building equipments. It computes novel diagnosis results consisting of two parts: (i) the extent to which building equipments cause abnormal energy use, and (ii) the extent to which internal and external factors determine the energy use of building equipments. Computing such diagnosis results requires an approach that can predict the energy use for the different submeters and that can also determine the factors that influence the energy use. However, existing building approaches do not meet these requirements. As a remedy, we propose a novel approach using the generalized additive model (GAM), which incorporates various exogenous variables affecting building energy use, such as weather conditions and time of the day. Our experiments demonstrate that the proposed method can efficiently model the impact of different factors and diagnose the causes of anomalies.