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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors