How do I calculate difference between consecutive rows and columns

0 votes

Hi,

 I want to display the differences between value for the following data

     Column 1 | Column 2 | Column 3 | Column 4 | Column 5

           200           100            350            900              800

Diff:           -100          +250          +550            -100

How do I calculate difference between consecutive rows and columns?

May 21, 2019 in Power BI by Phalguni
• 1,020 points
12,000 views

1 answer to this question.

0 votes

There are two ways through which you can do this:

Method 1: 

Calculated column = 
VAR RowAbove=
CALCULATE (
SUM (Table[Value]),
FILTER (Table, Table[Index] = EARLIER (Table[Index]) - 1))
RETURN
Table[Value] - RowAbove
Method 2: 
Diff One vs Two = [Column 1] - [Column 2]
Hope This Helps!!
answered May 21, 2019 by Avantika
• 1,520 points

Related Questions In Power BI

0 votes
1 answer

How DAX Difference between naked SUM and sum wrapped in CALCULATE?

This is materially different than the question ...READ MORE

answered Oct 8, 2020 in Power BI by Gitika
• 65,770 points
1,751 views
0 votes
0 answers
0 votes
0 answers
0 votes
1 answer

Install Power BI Desktop

It’s a pretty simple process. All you ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
1,022 views
0 votes
1 answer

Few tips before I start creating Power BI dashboard

It’s always advisable to begin with the data ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
886 views
0 votes
1 answer

How do I format the KPI in Power BI

format the KPI by selecting the paint ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
1,233 views
+1 vote
1 answer
0 votes
1 answer

How do I add a filter and a slicer?

Hi, Its OLTP and DW modeling. However, you ...READ MORE

answered May 23, 2019 in Power BI by Avantika
• 1,520 points

edited May 23, 2019 by Omkar 753 views
0 votes
1 answer

How do I convert month format in Power BI?

Hi, This can easily be done using DAX ...READ MORE

answered Mar 27, 2019 in Power BI by Avantika
• 1,520 points
5,000 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP