Forum Discussion
Anonymous
2 years agoNot applicable
Extra MoM% computed
I calculated the MoM% with the "Quick Measure" option. The problem is that it adds an extra month that doesn't exist or assumes that the sales are zero in the next month. For example, I have data onl...
- 2 years ago
Hello Anonymous , Please use below measure and it will remove current month.
Sales MoM% = IF( ISFILTERED('Sheet1'[Date]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."), VAR __PREV_MONTH = CALCULATE( SUM('Sheet1'[Sales]), DATEADD('Sheet1'[Date].[Date], -1, MONTH) ) RETURN IF(SUM('Sheet1'[Sales]) <> BLANK(),DIVIDE(SUM('Sheet1'[Sales]) - __PREV_MONTH, __PREV_MONTH),BLANK()) )If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Kishore_KVN
2 years agoSolution Sage
Hello Anonymous , Please use below measure and it will remove current month.
Sales MoM% =
IF(
ISFILTERED('Sheet1'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
VAR __PREV_MONTH = CALCULATE(
SUM('Sheet1'[Sales]),
DATEADD('Sheet1'[Date].[Date], -1, MONTH)
)
RETURN
IF(SUM('Sheet1'[Sales]) <> BLANK(),DIVIDE(SUM('Sheet1'[Sales]) - __PREV_MONTH, __PREV_MONTH),BLANK())
)
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!