Better solution: Let Metabase do the pivoting, then it can handle the period name changes gracefully without breaking your question. I explain how to do it here:
Dynamic column names require Dynamic SQL programming techniques, which is not something you can do from Metabase easily. Instead of making the periods columns, pivot the month columns into rows, where you can control the category name. The bar chart will create the breakout based on the category column. The breakout is calculated when the chart is rendered. The only thing that might change is the colors for the columns, as the charts remember previous series and assign new colors for new series. …