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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Alex_369
Frequent Visitor

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.