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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-yetao1-msft
Community Support
Community Support

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
v-yetao1-msft
Community Support
Community Support

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/

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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))

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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