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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX weighted calculation shows negative for total while each row is positive values

Hi Power BI community,

 

Below screenshot you will see two columns - SuiteArea and mR12WeightedGLA. You can see in this screenshot under mR12WeightedGLA, each row is showing a positive value but the total is negative (yellow higlighted). 

Alex_369_0-1704919141517.png

 

mR12WeightedGLA refers to the SuiteArea, the formula for it is :

mR12WeightedGLA =
IF([SalesMAT]<>0,
    FactSuiteArea[SuiteArea]
        * DIVIDE (
            (
                MIN ( MAX ( DimLease[ExpiryDate] ), [mR12EndDate] )
                    - MAX ( MAX ( DimLease[BeginDate] ), [mR12StartDate] )
            ),
            [mR12TotalDays]
        ),
    BLANK()
)
 
I wonder if there is something wrong with my formula? Thank you for you help in advance!
 
Best regards,
Alex
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Most likely is that one of the following expressions is negative in the total row:

MIN ( MAX ( DimLease[ExpiryDate] ), [mR12EndDate] )
- MAX ( MAX ( DimLease[BeginDate] ), [mR12StartDate] )
[mR12TotalDays]

 

Try testing those pieces independently to make sure they're returning what you expect in the total line.

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

Most likely is that one of the following expressions is negative in the total row:

MIN ( MAX ( DimLease[ExpiryDate] ), [mR12EndDate] )
- MAX ( MAX ( DimLease[BeginDate] ), [mR12StartDate] )
[mR12TotalDays]

 

Try testing those pieces independently to make sure they're returning what you expect in the total line.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.