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! Learn more

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.