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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
aashton
Helper V
Helper V

Average Annualized percent

Hello,

I am trying to find the average annualized percent, presently in Excel I use the forumula:

SUM((columns Jan - current month)/number of months)*12.  So for October, I'm adding up Jan - Oct, dividing by 10, then multiplying by 12 to annualize it.  In my power BI I have:

Controllable Turnover is the measure I am trying to annualize

Calculated Field - Month Year Number = MONTH(Month Year) --- trying to get the month number

 

The problem I have is I can't use DIVIDE with the calculated field, can only divide with a measure.  

 

1 ACCEPTED SOLUTION

Hi @aashton ,

 

//My value is a measure


Please try:

Measure = 
VAR _month = MAX('Calendar'[Month Number])
VAR _year = MAX('Calendar'[Year])
VAR _total = SUMX(FILTER(ALL('Calendar'),'Calendar'[Year]=_year&&'Calendar'[Month Number]<=_month),[Value])
VAR _result = DIVIDE(_total,_month)*100
RETURN
_result

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

Hi @aashton ,

Please new a measure like:

 

Measure = 
VAR _month = MAX('Calendar'[Month Number])
VAR _year = MAX('Calendar'[Year])
VAR _total = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Calendar'),'Calendar'[Year]=_year&&'Calendar'[Month Number]<=_month))
VAR _result = DIVIDE(_total,_month)*100
RETURN
_result

 

vcgaomsft_0-1668667602262.png

If only the latest value is needed:

 

Measure 2 = 
VAR _month = MONTH(TODAY())
VAR _year = YEAR(TODAY())
VAR _total = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Calendar'),'Calendar'[Year]=_year&&'Calendar'[Month Number]<=_month))
VAR _result = DIVIDE(_total,_month)*100
RETURN
_result

 

vcgaomsft_1-1668667754588.png

If I have misunderstood your needs, please feel free to contact me.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Thank you for your help.  Having trouble getting the _Total to work....My value is a measure, so it is saying i can't use Sum. .. So I tried below but am getting the Placeholder function error:

 

_Total = CALCULATE('CR HCM Monthly Data'[Controllable Turnover percentage], 'CR HCM Monthly Data'[Month Year Year Number]=[_Year])

Hi @aashton ,

 

//My value is a measure


Please try:

Measure = 
VAR _month = MAX('Calendar'[Month Number])
VAR _year = MAX('Calendar'[Year])
VAR _total = SUMX(FILTER(ALL('Calendar'),'Calendar'[Year]=_year&&'Calendar'[Month Number]<=_month),[Value])
VAR _result = DIVIDE(_total,_month)*100
RETURN
_result

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.