Forum Discussion
Month over Month Comparison from previous year
- 7 years ago
tulsi ,
Click on the change column and click Modeling-> Format, change the format to percentage.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tulsi ,
Generally, you can create a measure using DAX below:
Change =
VAR Current_Month =
MONTH ( Table[Date] )
VAR Previous_Month = Current_Month - 1
VAR Current_Month_Hours =
CALCULATE (
SUM ( Table[Hours] ),
FILTER ( Table, MONTH ( Table[Date] ) = Current_Month )
)
VAR Previous_Month_Hours =
CALCULATE (
SUM ( Table[Hours] ),
FILTER ( Table, MONTH ( Table[Date] ) = Previous_Month )
)
RETURN
IF (
YEAR ( Table[Date] )
>= YEAR ( TODAY () ) - 1,
Current_Month_Hours - Previous_Month_Hours / Previous_Month_Hours,
BLANK ()
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey,
I tried your DAX formula to create a calculated formula like this;
Change =
VAR Current_Month =
Month (Final[Month])
VAR Previous_Month = Current_Month - 1
VAR Current_Month_Hours =
CALCULATE(
SUM( Final[Total Number of Hours]),
FILTER(Final,MONTH(Final[Month])=Current_Month)
)
VAR Previous_Month_Hours =
CALCULATE(
SUM(Final[Total Number of Hours]),
FILTER(Final,MONTH(Final[Month])=Previous_Month)
)
RETURN
IF(
YEAR(Final[Month])
>= YEAR( TODAY() )-1,
Current_Month_Hours - Previous_Month_Hours / Previous_Month_Hours,
BLANK()
)
Now the result that I want is % change in the total number of hours by task name month by month but i'm getting something like this;
- v-yuta-msft7 years ago
Community Support
tulsi ,
Click on the change column and click Modeling-> Format, change the format to percentage.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.