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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Summarizing rows

Hi,

 

I spent a lot of time on this and now I'm looking for help.

 

I need to summarize lines of an ID. It sounds easy, but the result that I need is a little bit different, and I'm showing it below:

 

Capture.PNG

I'm looking for the yellow column. All the others I have.

 

I tried using SUM, SUMX, CALCULATE, SUMMARIZE, .....

 

There is anyone with an idea to solve this?

 

Thanks a lot.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

If you want to calculate the column ACUM which you highlight in your image, you could try the steps below.

1. Create the index column in query editor.

2. Create the group index calculated column with dax.

group index = 
RANKX (
    FILTER ( 'Table', EARLIER ( 'Table'[ID] ) = 'Table'[ID] ),
    'Table'[Index],
    ,
    ASC
)

3. Create the measure with the formula below.

Measure =
CALCULATE (
    SUM ( 'Table'[STATUS_] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[ID] ),
        'Table'[group index] <= MAX ( 'Table'[group index] )
    )
)

Here is the output.

Capture.PNG

If you still need help, free to ask.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

If you want to calculate the column ACUM which you highlight in your image, you could try the steps below.

1. Create the index column in query editor.

2. Create the group index calculated column with dax.

group index = 
RANKX (
    FILTER ( 'Table', EARLIER ( 'Table'[ID] ) = 'Table'[ID] ),
    'Table'[Index],
    ,
    ASC
)

3. Create the measure with the formula below.

Measure =
CALCULATE (
    SUM ( 'Table'[STATUS_] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[ID] ),
        'Table'[group index] <= MAX ( 'Table'[group index] )
    )
)

Here is the output.

Capture.PNG

If you still need help, free to ask.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @Anonymous 

 

Try this function:

 

 

MaxAcum = CALCULATE(MAX(Table[Total]);ALLEXCEPT(Table;Table[ID]))
Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks a lot for so fast answer.

 

It didn't work.

 

The TOTAL column has the same value to all rows.

 

Regards.

Anonymous
Not applicable

sorry brother, i had understood that u need the last value accumulated, but i need a function to sum each value through status =/

Anonymous
Not applicable

Relax and thanks for the attempt.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.