Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Add more years to a table

Hi everyone!

I have a table from SQL with some data by years/months that stops at December 2023.

I want to add more years with the same data as previous year, where Value is multiplied by 5%. 

Example for 2024, I need to have the same number of rows with the same data, except culmun Value which will be = Value * 5%.

Is it possible? Maybe in power query?

Thank you!

adriandumitru_0-1675250877231.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

In Power Query you could duplicate the query for 2023, switch to the transform ribbon and use the Standard section from the Number column section to add 1 to the year and multiply the value by 1.05. Then append the 2 queries.

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

In Power Query you could duplicate the query for 2023, switch to the transform ribbon and use the Standard section from the Number column section to add 1 to the year and multiply the value by 1.05. Then append the 2 queries.

Anonymous
Not applicable

Thank You, but maybe there is a more automated solution?

I will need at least 3 more years to replicate and append, this will have an impact on performance.

You could do it in the SQL. Depending on the flavour of SQL you could take the query which currently pulls data for 2022 and use that to define a CTE. Then the query which returns data could be a union of the base data and as many copies as you need, adding values to the year column and changing the data values.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.