I will like to create a new column that calculates the percentage change from JAN-FEB-MAR-APR-MAY-JUN which are in the COLUMN "MONTH" based on the COLUMN "TOTAL". Here is a script I have tried but its not working
change perc =
VAR ValueLastMONTH =
CALCULATE (
SUM ( Sheet1[TOTAL] ),
FILTER (
Sheet1,
Sheet1[MONTH]
= ( EARLIER ( Sheet1[MONTH] ) - 1 )
&&Sheet1 = EARLIER ( Sheet1[CATEGORY] )
)
)
RETURN
IF (
ISBLANK ( ValueLastMONTH ),
0,
( Sheet1[TOTAL] - ValueLastMONTH )
/ ValueLastMONTH
Here is the link to the power bi file. enter link description here