Understanding the underlying factors causing changes in energy-related carbon dioxide (CO2) emissions is crucial for informed policymaking, particularly at the sectoral level. The research background has employed divisia index methods to analyze CO2 from fossil fuel combustion emissions and identify their constituent components associated with specific drivers within defined time frames. Although these analyses have accounted single-period, multi-period, and cumulative year-by-year frames, none considered the changes in emission trends to determine suitable decomposition periods for sectoral level analysis. Incorporating shifts in emission trends is essential for precise driver identification. This study introduced a comprehensive methodology for detailed and disaggregated decomposition at the sectoral level. Our approach selected decomposition periods based on aggregate energy-related CO2 emission trends. To achieve this, we employed an algorithm that minimizes the total mean square error for period selection. For the decomposition process, we applied the logarithmic mean divisia index method (LMDI) to the Kaya factors governing energy-related CO2 emissions of the Spanish economy. Additionally, we explored various levels of disaggregation within seven sectors from economy related to energy consumption. Through this analysis, we identified and scrutinized six decomposition periods from 1995 to 2020. Our findings highlight the substantial effects of electricity and heat, transportation, and industry sectors. We identified opportunities for reducing energy intensity, carbon intensity and, in some cases, structural factors associated with economic activities contributing to emissions. This methodology offers amore straightforward interpretation of results and establishes a basic time frame for decomposition analysis at a granular level of disaggregation.