Forum Discussion

Albawani's avatar
Albawani
Frequent Visitor
4 years ago
Solved

Total after if condition

Hi,

How can we get the correct total here ?

 

 

 

  • Albawani 

    Try it like this.

    Debit Closing =
    SUMX (
        VALUES ( Table[ACCOUNTID] ),
        IF ( BSBankTrans[Balance] > 0, BSBankTrans[Balance], 0 )
    )

    You will need to change the name of the table to match whatever is in your model.  It is the table that has the [AccountID] field.

1 Reply

  • Albawani 

    Try it like this.

    Debit Closing =
    SUMX (
        VALUES ( Table[ACCOUNTID] ),
        IF ( BSBankTrans[Balance] > 0, BSBankTrans[Balance], 0 )
    )

    You will need to change the name of the table to match whatever is in your model.  It is the table that has the [AccountID] field.