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
Albawani
Frequent Visitor

Total after if condition

Hi,

How can we get the correct total here ?

Albawani_2-1639085884045.png

 

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@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.

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@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.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.