According to the U.S. Department of Commerce's Bureau of Economic Analysis (BEA), the price index for gross domestic purchases during the second quarter of 2018 did in fact increase by 2.3 percent (dipping slightly from the first quarter's 2.5 percent increase). Gross domestic purchases measure the value of all goods and services bought by U.S. residents despite where they were produced. It can be calculated as GDP less exports. When food and energy are removed, the gross domestic purchases index rises to 2.4 percent.
Gross domestic purchases is partly derived from measuring "personal consumption expenditures" (PCE). The PCE price index measures the prices paid for those goods and services by the consumers. During the second quarter, this index rose 1.8 percent (again dipping from a 2.5 percent increase in the first quarter).
However, when food and energy prices are excluded, the index rose to 2.0 percent (down from a first quarter 2.2 percent). The BEA often removes food and energy prices when measuring PCE because of their tendencies to fluctuate wildly based on outside factors that don't necessarily depict the state of the economy accurately.
Taken separately, food and energy prices alone also rose during the second quarter of 2018. However, because of their volatility, they didn't rise as dramatically as other sectors of the economy. Therefore, when those food and energy prices are removed from the gross domestic purchases and PCE indices, those indices rise more dramatically because the overall average of the other sectors of the economy are faring better than the food and energy sectors are.
As an example, take three separate sectors (A, B, and C) and pool them together to make an index. If sector A rose 2.25 percent over the quarter, sector B rose 2.0 percent over the quarter, and sector C rose just 1.75 percent over the quarter, the average growth rate over the quarter across the entire index would be 2.0 percent. However, if you remove the lower performing sector C from the equation, despite the fact that sector C still had growth, you would find that the average growth rate for the index increases to 2.125 percent.