Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
UK06B1
Helper II
Helper II

Month On Month mvmt % calculating incorrectly when prior month a negative value

Hello

Can anyone help – using the month on month movement in Power BI I don’t get the desired result in the %s when there is a credit value in the previous month. Example below

The costs increased from a credit of 72k to a credit of 33k in the current month  - there for its an increase in the over all costs of 38k (as shown in the abs calc ), but the % shows a negative 54% - if I were to do in excel I use the formula as shown in the 2nd screen shot – how can I replicate this in the BI calc, I have tried a few ways but am struggling to make it work .

 

Once i get this correct i can then conditional format correctly on the % as currently its not working given the % movment is wrong sign convention. 

 

Thanks

UK06B1_0-1706897330183.pngUK06B1_1-1706897335269.png

 

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hi! You can do another measure to account for what you need. I put the following data in a table:

audreygerred_0-1706898865573.png

I then made a measure for CY = 

SUM('Table'[Cost])
 
Then, one for PY =
Cost PY = CALCULATE([Cost CY], SAMEPERIODLASTYEAR('DateTable'[Date]))
 
Then, one for the difference = 
[Cost CY]-[Cost PY]
 
Then one for YoY% (can be done for MoM as well, but I went with YoY since your data referenced CY and PY) = 
Cost CY YoY% =
IF(
    ISFILTERED('Table'[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_YEAR = CALCULATE([Cost CY], DATEADD('DateTable'[Date], -1, YEAR))
    RETURN
        DIVIDE([Cost CY] - __PREV_YEAR, __PREV_YEAR)
)
 
Then finally - the one that accounts for the negative in PY = 
IF([Cost PY]>0,[Cost CY YoY%],(-1*DIVIDE([Diff],[Cost PY])))
 
And, here are the results:
audreygerred_1-1706899056379.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
UK06B1
Helper II
Helper II

Great thanks alot for your help that works. 

You are very welcome! Happy to help!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





audreygerred
Super User
Super User

Hi! You can do another measure to account for what you need. I put the following data in a table:

audreygerred_0-1706898865573.png

I then made a measure for CY = 

SUM('Table'[Cost])
 
Then, one for PY =
Cost PY = CALCULATE([Cost CY], SAMEPERIODLASTYEAR('DateTable'[Date]))
 
Then, one for the difference = 
[Cost CY]-[Cost PY]
 
Then one for YoY% (can be done for MoM as well, but I went with YoY since your data referenced CY and PY) = 
Cost CY YoY% =
IF(
    ISFILTERED('Table'[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_YEAR = CALCULATE([Cost CY], DATEADD('DateTable'[Date], -1, YEAR))
    RETURN
        DIVIDE([Cost CY] - __PREV_YEAR, __PREV_YEAR)
)
 
Then finally - the one that accounts for the negative in PY = 
IF([Cost PY]>0,[Cost CY YoY%],(-1*DIVIDE([Diff],[Cost PY])))
 
And, here are the results:
audreygerred_1-1706899056379.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors