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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
smulan
Regular Visitor

Get a % of yearly total

Hi

 

I have a simple salesamount by period and need to calculate a seasonality (% of yearly total). A sample of Sales:

 

PeriodAmount
2015-12-01275
2016-01-0120
2016-02-0130
2016-03-0132
2016-04-0121
2016-05-0117
2016-06-0154
2016-07-0123
2016-08-0134
2016-09-0121
2016-10-0118
2016-11-0119
2016-12-0121
2017-01-0132
2017-02-0112

 I have a relation between Sales and Dim Time. I need to get the % of year like this:

 

PeriodAmount % of year
2015-12-01275100,00%
2016-01-01206,45%
2016-02-01309,68%
2016-03-013210,32%
2016-04-01216,77%
2016-05-01175,48%
2016-06-015417,42%
2016-07-01237,42%
2016-08-013410,97%
2016-09-01216,77%
2016-10-01185,81%
2016-11-01196,13%
2016-12-01216,77%
2017-01-013210,70%

 

Any guidance ...

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @smulan,

 

First, add a year column using the formula: Year = YEAR(Test[Period]).

Then create a measure which calculates the total sum of each year, create calculated column which displays the percent of each year. You will get the result as the screenshot below.

Sum of each year = CALCULATE(SUM(Test[Amount]),ALLEXCEPT(Test,Test[Year]))
% of year = Test[Amount]/Test[Sum of each year]

11.jpg

 

Best Regards,
Angelia

View solution in original post

1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @smulan,

 

First, add a year column using the formula: Year = YEAR(Test[Period]).

Then create a measure which calculates the total sum of each year, create calculated column which displays the percent of each year. You will get the result as the screenshot below.

Sum of each year = CALCULATE(SUM(Test[Amount]),ALLEXCEPT(Test,Test[Year]))
% of year = Test[Amount]/Test[Sum of each year]

11.jpg

 

Best Regards,
Angelia

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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