cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Calculate an evolution percent

Hi guys.

I`m having problems to calculate a percent measure.

I need to get a value in the past and calculate with the actual value.

Exemple:

https://i.ibb.co/2WxBjYF/variation.png

Most recent date: 31/07/2020

Actual value (31/07/2020): 703,57

Date in the past: 18/07/2020

Value in the past (18/07/2020): 1022,86

 

New Measure in (31/07/2020): ( 1 - ( 703,57 / 1022,86 ) ) * ( - 1 )

New Measure in (31/07/2020): -31,22%

 

New Measure in (31/07/2020): ( 1 - ( 907,71 / 1000,57 ) ) * ( - 1 )

New Measure in (30/07/2020): -9,28%

 

And so on...

 

Can anyone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User VI
Super User VI

Re: Calculate an evolution percent

@Williamspsouza 

if I understand your need correct (I'm not sure at all) you can try a measure

Measure = 
VAR CurrentValue = 'PERNAMBUCO'[MediaMovelNovosCasos]
VAR PreviousValue = CALCULATE('PERNAMBUCO'[MediaMovelNovosCasos], DATEADD(PERNAMBUCO[dt_notificacao], -13, DAY))
RETURN
( 1 - DIVIDE( CurrentValue , PreviousValue ) ) * ( - 1 )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Calculate an evolution percent

@Williamspsouza ,Can you share sample data and sample output in table format?



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper II
Helper II

Re: Calculate an evolution percent

Highlighted
Super User VI
Super User VI

Re: Calculate an evolution percent

@Williamspsouza 

if I understand your need correct (I'm not sure at all) you can try a measure

Measure = 
VAR CurrentValue = 'PERNAMBUCO'[MediaMovelNovosCasos]
VAR PreviousValue = CALCULATE('PERNAMBUCO'[MediaMovelNovosCasos], DATEADD(PERNAMBUCO[dt_notificacao], -13, DAY))
RETURN
( 1 - DIVIDE( CurrentValue , PreviousValue ) ) * ( - 1 )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors