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! Request now

Reply
MicheleGenerali
Frequent Visitor

calculate previous month values return a negative column for last month

Hi all 
I'm usin an external calendar table to make to make a MoM comparison with the previous year. Now i'm trying to calculate the variance based on prevoius month for the current year, but when i do a measure it adds a last column with the negative total value of my previous month

MicheleGenerali_0-1690797721844.png

This is my Dax expression : 
Measure =

    VAR __PREV_MONTH =
        CALCULATE(
            SUM('SBU_Prodotto'[Incassi Danni AC]),
            DATEADD('DATE'[Date].[Date], -1, MONTH)
        )
    RETURN
            SUM('SBU_Prodotto'[Incassi Danni AC]) - __PREV_MONTH

How can i have a function for having only the "green columns" ? 
0 REPLIES 0

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.