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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.