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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Sum Invoice Value if contains a specific row

Hi everyone!

 

I have 3 important columns: Document_No (the invoices), Description (article/SKU) and Value (the QTY)

How can I sum Value of every invoices that contains a specific row/article:

adriandumitru_0-1676273832626.png

Thank you!

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 
Please try

NewMeasure =
SUMX (
    VALUES ( 'Table'[Document_No] ),
    CALCULATE (
        IF (
            { "3% Discount Card" } IN VALUES ( Table[Description] ),
            SUM ( Table[Value] )
        )
    )
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Anonymous 
Please try

NewMeasure =
SUMX (
    VALUES ( 'Table'[Document_No] ),
    CALCULATE (
        IF (
            { "3% Discount Card" } IN VALUES ( Table[Description] ),
            SUM ( Table[Value] )
        )
    )
)
Anonymous
Not applicable

Yes, it works! 

Thank you!

wdx223_Daniel
Super User
Super User

New Measure=IF(CONTAINSROW(VALUES(Table[Description],"3% Discount Card"),SUM(Table[Value]))

Anonymous
Not applicable

Thank you, @wdx223_Daniel but the result of this measure is the total of value. The if condition works like: if in one month there is "3% Discout Card" then sum of all Value, if not, blank.

I need to sum only the Document_NO that has "3% Discount Card".

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.