Forum Discussion
Growth rates (Month Over Month) formula
In this scenario, what are the values in Tables[Month]? If it's just the month part of the date, it will return incorrect result since month number will repeat in every year. So you should also add the Year column as condition in your FILTER() function. Then it will show the previous month total on each row.
Revenue % Change =
VAR RevenueLastMonth =
CALCULATE (
SUM ( Tables[Revenue] );
FILTER(Tables;
Tables[Month]
= ( EARLIER ( Tables[Month] ) - 1 )
&& Tables[Year] = EARLIER ( Tables[Year] )
&& Tables[Country] = EARLIER ( Tables[Country] )
&& Tables[Source] = EARLIER ( Tables[Source] )
)
)
RETURN
IF (
ISBLANK ( RevenueLastMonth );
0;
( Tables[Revenue] - RevenueLastMonth )
/ RevenueLastMonth
)
See my sample below:
Regards,
Dear v-sihou-msft,
Thank you for your solution!
Now I am closer to the final desired outcome.
The sum of previous month Revenue is shown for the each date of the month.
If it had appeared only once, the % Change formula would give me the right result.
Do you know how to make it?
- v-sihou-msft9 years agoMicrosoft Employee
This is a calculated column, the calculation in formula will be resolved on each row. What do you mean "appear only once"? Do you want the previous month total appear on the first day of month?
Regards,
- parry2k9 years agoSuper User
Hi dmitrpav
As mentioned earlier I can send you sample pbix file which has all the calculations and I'm sure it will be helpful. I did already sent you private message for me to send you the file. Let me know if you are still interested.
Thanks,
P
- Cristina1010839 years agoAdvocate II
Would it be possible you send to me this file you mention? Thanks
- dmitrpav9 years agoFrequent Visitor
Exactly, I would like to have the previous month total to appear on the first day of a month only.
Kind regards,
D