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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.