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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rico_o_o
Regular Visitor

How to make a sum aggregate by group ? Equivalent of sumifs on Power BI ?

 

Hello, 

 

My table is called "Sales".

 

Each invoice is divided into different invoice lines. I would like to add a column with a formula that would enable me to aggregate the amounts of the invoice lines according to the invoice number to which they are attached.

 

Example: this new column would display for the first two lines the amount 5 because 2+3+6 = 11 = total amount of invoice A.

 

Can you help me please ? Thank you so much!

 

rico_o_o_0-1684576023761.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @rico_o_o 

are you expecting a calculated column like below:

 

column = 
SUMX(
    FILTER(
        sales,
        sales[Invoice_number]=EARLIER(sales[Invoice_number])
    ),
    sales[Amount(in euro)]
)

 

FreemanZ_0-1684578271820.png

 

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @rico_o_o 

are you expecting a calculated column like below:

 

column = 
SUMX(
    FILTER(
        sales,
        sales[Invoice_number]=EARLIER(sales[Invoice_number])
    ),
    sales[Amount(in euro)]
)

 

FreemanZ_0-1684578271820.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors