Forum Discussion

watje255_ju's avatar
watje255_ju
Icon for Helper III rankHelper III
4 years ago
Solved

SUMX not totalling correctly (as expected)/ causing error in matrix?

Hello,  I have had a good read of the forums, but I cannot find an answer that works for me so looking for some more help please.   The SUMX measure is not giving the total I would expect (the sum...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    4 years ago

    Hi,

    Thank you for your feedback.

    Could you please check the below picture and the attached pbix file?

     

     

    Measure total fix: = 
    SUMX (
        SUMMARIZE (
            FactAccountsReceivable,
            FactAccountsReceivable[Voucher],
            FactAccountsReceivable[Customer Key]
        ),
        [Test Group NZD Balances]
    )
    

     

    Amount Per Bucket = 
    CALCULATE (
        [Measure total fix:],
        FILTER (
            VALUES ( FactAccountsReceivable[Voucher] ),
            VAR FromDays =
                MIN ( 'Aging Groups ATB'[From] )
            VAR ToDays =
                MAX ( 'Aging Groups ATB'[To] )
            RETURN
                [Days Over 2] > FromDays
                    && [Days Over 2] <= ToDays
        )
    )