Forum Discussion
shkabuzar
5 years agoFrequent Visitor
Calculate future month values using the previous month value
Hi, My data looks as below and future values to be calculated using previous month values. Table1 year_month Value 01-10-2020 10 01-11-2020 15 01-12-2020 22 01-01-2021 34 ...
- Anonymous5 years ago
Hi shkabuzar ,
Please try the following formula to create a measure:
Measure = VAR _date = CALCULATE ( MAX ( 'Table1'[year_month] ), FILTER ( 'Table1', 'Table1'[year_month] <= MAX ( 'Calendar table'[Date] ) ) ) VAR _value = CALCULATE ( MAX ( 'Table1'[Value] ), 'Table1'[year_month] = _date ) VAR _monthdiff = DATEDIFF ( _date, MAX ( 'Calendar table'[Date] ), MONTH ) RETURN IF ( _monthdiff = 0, _value, _value * POWER ( 1.1, _monthdiff ) )Here is the final output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi shkabuzar ,
Please try the following formula to create a measure:
Measure =
VAR _date =
CALCULATE (
MAX ( 'Table1'[year_month] ),
FILTER ( 'Table1', 'Table1'[year_month] <= MAX ( 'Calendar table'[Date] ) )
)
VAR _value =
CALCULATE ( MAX ( 'Table1'[Value] ), 'Table1'[year_month] = _date )
VAR _monthdiff =
DATEDIFF ( _date, MAX ( 'Calendar table'[Date] ), MONTH )
RETURN
IF ( _monthdiff = 0, _value, _value * POWER ( 1.1, _monthdiff ) )
Here is the final output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Syndicate_Admin
1 year agoAdministrator
I'm interested in your solution, but I have a problem. I have my Calendar table linked to my fact table. How can I d
isplay all the future data?