cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Calculate difference in consecutive rows while applying filters from relational tables

Hi there,

I was recently helped with a query on about calculating the difference between consecutive rows - which helped a lot when all the data had already been aggragated.

I would like to calculate the difference between consecutive rows, but taking into consideration the data that is being used from the reference table as a means to filter the data.

I have come up with calculations, but the results from when I filter the data based on the reference table are incorrect.

I would really appreciate the assistance / input on this.

Kind regards,

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Calculate difference in consecutive rows while applying filters from relational tables

I can reproduce your table by adding "business unit" and "entity unit" from reference table into Account table in the table visual

If so, i can go on next step.

Best Regards
Maggie

4 REPLIES 4
Community Support Team

## Re: Calculate difference in consecutive rows while applying filters from relational tables

I can reproduce your table by adding "business unit" and "entity unit" from reference table into Account table in the table visual

If so, i can go on next step.

Best Regards
Maggie

Frequent Visitor

## Re: Calculate difference in consecutive rows while applying filters from relational tables

@v-juanli-msft  Yes, this works :).

The only thing is that the first index (index 0) and last index (index 5) should have the actual value and no the difference. So index 0 is correct with the value of 100, but index 5 should have a value of 800.

Community Support Team

## Re: Calculate difference in consecutive rows while applying filters from relational tables

Is this problem sloved?

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

Best Regards

Maggie

Frequent Visitor

## Re: Calculate difference in consecutive rows while applying filters from relational tables

Hi Maggie.

Thank you for the assistance. I just accepted it as a solution.

Announcements

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!