Forum Discussion
Anonymous
7 years agoNot applicable
Month Over Month Change (Exclude First Month and Month After)
Hi Power BI Community, I am running into an issue using month over month change (not % change but actual difference). My data consists of month balances until the current month where it is the pr...
- 7 years ago
Hi Anonymous,
You can use the following Measure to count actual difference Month Over Month, but do not remember to close the “show items with no data”.
Measure = VAR pre = CALCULATE ( [weighted measure], DATEADD ( 'query2'[Month End].[Date], -1, MONTH ) ) VAR thisMonth = CALCULATE ( [Weighted Measure] ) VAR d = SELECTEDVALUE ( query2[Month End] ) VAR ma = MAXX ( ALL ( query2 ), [Month End] ) VAR mi = MINX ( ALL ( query2 ), query2[Month End] ) RETURN IF ( d > mi && d < ma, thisMonth - pre, BLANK () )BTW, pbix as attached.
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
v-lid-msft
Community Support
7 years agoHi Anonymous,
You can use the following Measure to count actual difference Month Over Month, but do not remember to close the “show items with no data”.
Measure =
VAR pre =
CALCULATE (
[weighted measure],
DATEADD ( 'query2'[Month End].[Date], -1, MONTH )
)
VAR thisMonth =
CALCULATE ( [Weighted Measure] )
VAR d =
SELECTEDVALUE ( query2[Month End] )
VAR ma =
MAXX ( ALL ( query2 ), [Month End] )
VAR mi =
MINX ( ALL ( query2 ), query2[Month End] )
RETURN
IF ( d > mi && d < ma, thisMonth - pre, BLANK () )
BTW, pbix as attached.
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
- Anonymous6 years agoNot applicable
Thanks v-lid-msft for all your help, this worked!