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.
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?
Solved! Go to Solution.
@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 )
@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 )
@Anonymous ,Can you share sample data and sample output in table format?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |