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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MS3
Frequent Visitor

SUM value is Row in a Column Equals a Specific Value and Value is Greater than Zero

 

Hello!

 

I am trying to SUM Values [Amount] if a Column [FS Item (Account)] is Equal to a Specific Value [173] and the [Amount] is Positive / Greater than Zero.

 

The formula I have to SUM the values is

CALCULATE (
    SUM ( Masterdata[Amount] ),
    Masterdata[FS Item (Account)]="173"
)
 
which provides the SUM, but I am unsure how to add the condition for it to add only the [Amount] that are greater than zero.
 
Would appreciate any help.
 
Best regards,

 

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @MS3 ,

 

Try the following DAX:

 

CALCULATE (
                     SUM ( Masterdata[Amount] ),
                     FILTER(
                                 Masterdata, Masterdata[FS Item (Account)]="173" && Masterdata[Amount] > 0
                                )
)
 
Kindly give Kudos if the solution is helpful and Mark it as a solution if it resolves the issue! 🙂
 
Thanks,
Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

5 REPLIES 5
Pragati11
Super User
Super User

Hi @MS3 ,

 

Try the following DAX:

 

CALCULATE (
                     SUM ( Masterdata[Amount] ),
                     FILTER(
                                 Masterdata, Masterdata[FS Item (Account)]="173" && Masterdata[Amount] > 0
                                )
)
 
Kindly give Kudos if the solution is helpful and Mark it as a solution if it resolves the issue! 🙂
 
Thanks,
Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

MS3
Frequent Visitor

 

Thank you very much!!!

 

It worked wonderfully!

Anonymous
Not applicable

it should be like this 
CALCULATE (
    SUM ( Masterdata[Amount] ),
    Masterdata[FS Item (Account)]="173"
    && [Amount] >0
)
MS3
Frequent Visitor

 

Needed to add the table for Amount as per below:

 

CALCULATE (    SUM ( Masterdata[Amount] ),
    Masterdata[FS Item (Account)]="173"
    && Masterdata [Amount] >0
)

 

When I use the expression it tells me

"The expression contains multiple columns, but only a single column can be used in a True / False expression that is used as a Table Filter Expression"

 

Indeed [Amount] and [FS Item (Account)]] are columns in my Masterdata table.

 

 

Anonymous
Not applicable

sry, my bad 
do like this with a filter function :

scr.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.