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
Anonymous
Not applicable

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
az38
Community Champion
Community Champion

@Anonymous 

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
az38
Community Champion
Community Champion

@Anonymous 

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
amitchandak
Super User
Super User

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

Anonymous
Not applicable

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.

Top Solution Authors