Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a table as shown below. I have to plot the data in Grid, but column needs to be actual year. Every Year, Year will increment such as current Year + 1, + 2, and so on. So I cannot simply change the Colum Header. Table Field Names will not change in the Database. Is there a way in M-Query to change teh column nae such as YEAR(Now()), YEAR(Now()) +1 and so on. Please advice how to accomplish this?
Solved! Go to Solution.
@sabeensp see attached, look at table called Table in power query and it take the current year as a base and then replaces column names accordingly. It can be improved further but I think it is a good start.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@selpaqm does the column name always like yr1 yr2 yr3...if yes then I can get you the solution which will be dynamic
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@sabeensp see attached, look at table called Table in power query and it take the current year as a base and then replaces column names accordingly. It can be improved further but I think it is a good start.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I would have approached it the same way @parry2k , with Table.ColumnNames and List.Zip. A small change to reduce the number of steps would be to use this formula to make the list of Years for the column names with this:
=List.Transform({-1..3}, each Number.ToText(currentYear + _))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat agreed, assuming column numbers are in the same order and that's the reason I decided to not go with that path but thanks for pointing it out.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
did you try to change it from Transform Data section.
On home section click Transform data, then choose related table from queries section. change the table column headers with double click on it or just right click and rename it. this will be added to Applied steps section and even you refresh the data it will replace them by itself.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!