Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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
Solved! Go to Solution.
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.
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.
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.
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/
@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))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |