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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
gmasta1129
Resolver I
Resolver I

Sum if Formula

Hello,

 

I have the following columns in my report:

 

Cust No.

Total Amount

Is Credit Open

 

 

 

I need to produce the following formula in Power BI desktop...

 

If(Is Credit Open = "Y",SUMIF(total Amount by Cust. No).  

 

Can someone please help? 

 

Thank you! 

 

 

4 REPLIES 4
gmasta1129
Resolver I
Resolver I

Thank you for the quick response but unfortunately neither of the formulas worked.. 

Please see below highlighted column for result I am looking for.  I want to sum the total amount by cust. no and only the rows that contain a Y in Is Credit Open

 

gmasta1129_1-1666149480939.png

 

Measure=
               Calculate(Total Amount,ISCredit="Y")

v-xiaosun-msft
Community Support
Community Support

Hi @gmasta1129 ,

 

According to your description, here is my solution.

You can try to implement power bi sumif with the function in dax that is “Calculate”.

I created a sample.

vxiaosunmsft_0-1666145584996.png

For example, if we want filter "Is Credit Open"="Y" && "Cust. No">2, we can do as followings:

Measure =
IF (
    MAX ( 'Table'[Is Credit Open] ) = "Y",
    CALCULATE ( SUM ( 'Table'[Total Amount] ), 'Table'[Cust No.] > 2 )
)

Final output:

vxiaosunmsft_1-1666145849622.png

You can set the filter section according to your needs.

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @gmasta1129 

 

You need a measure, but how do you want to use that measure in your report? Do you want to use that in a table that has "Cust No."? if yes, try this:

Measure =
CALCULATE (
    SUM ( Table[Total Amount] ),
    KEEPFILTERS ( Table[Credit Open] = "Y" )
)

 

On the other hand, You can add Cust. No and total Amount to your visual and then use Credit Open in the filter pane and set that to show the Y values only.

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.