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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Yearly growth on several years

Hi everybody,

 

I'm facing an issue for calculating yearly growth when taking into account several years of analysis. 

 

My goal is to give the annual growth in € and % for 2018, 2019, 2020, 2021. But I want the user can select the years he wants to analyze with a filter.

 

I have tried with a calculate sum sales and parallelperiod but it doesn't work the way I want.

 

Can someone help me please?

 

Have a nice day

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

Through your description, I got 2 messages .

(1) annual growth in € yearly

(2) Percentage of annual growth per year

 

The first value you have created is 5 Sales Diff vs previous year .Then to create a measure to get the percentage of annual growth per year .

6 diff % =

var _diff= (keymeasures[1 Sales Total]-keymeasures[2 Sales Previous Year])/keymeasures[2 Sales Previous Year]

return IF(keymeasures[2 Sales Previous Year]=BLANK(),0,_diff)

 

Then add two visuals .Line chart to display the Percentage of annual growth per year . Clustered column chart to display annual growth in yearly . And create a slicer use ‘Dates[Year] field.

The effect is as shown:

Ailsa-msft_0-1618971272075.png

Ailsa-msft_1-1618971272077.png

Ailsa-msft_2-1618971272079.png

I have attached the pbix file, you can refer to it .

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Through your description, I got 2 messages .

(1) annual growth in € yearly

(2) Percentage of annual growth per year

 

The first value you have created is 5 Sales Diff vs previous year .Then to create a measure to get the percentage of annual growth per year .

6 diff % =

var _diff= (keymeasures[1 Sales Total]-keymeasures[2 Sales Previous Year])/keymeasures[2 Sales Previous Year]

return IF(keymeasures[2 Sales Previous Year]=BLANK(),0,_diff)

 

Then add two visuals .Line chart to display the Percentage of annual growth per year . Clustered column chart to display annual growth in yearly . And create a slicer use ‘Dates[Year] field.

The effect is as shown:

Ailsa-msft_0-1618971272075.png

Ailsa-msft_1-1618971272077.png

Ailsa-msft_2-1618971272079.png

I have attached the pbix file, you can refer to it .

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

All measures are in the sample pbix file, and the steps are numbered in front of each measure.

Picture1.png

 

https://www.dropbox.com/s/ix4u8aalgk4fhue/santek.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/



Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



amitchandak
Super User
Super User

@Anonymous , If you have date , then with help from date table

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

 

 

Or with help from separate Year table

 

This Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Year'),'Date'[Year Rank]=max('Year'[Year Rank])))
Last Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Year'),'Date'[Year Rank]=max('Year'[Year Rank])-1))

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.