cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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.

Have a nice day

1 ACCEPTED SOLUTION
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:

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.

3 REPLIES 3
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:

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.

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.

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.

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.

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors