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 20 in Power BI by Phalguni
• 1,010 points
287 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 20 by Avantika
• 1,500 points

Related Questions In Power BI

0 votes
1 answer

Difference between measure and calculate column in power BI

Hi Rahul,  With calculated columns, you can add new ...READ MORE

answered May 16 in Power BI by Cherukuri
• 28,360 points
634 views
0 votes
3 answers

How do I get token using javascript API while trying to embed graphs using Power BI

Use ADAL.js that will give you an ...READ MORE

answered Jun 22 in Power BI by anonymous
695 views
+1 vote
2 answers

Difference between Power BI pro and Power BI Premium

My answer is applicable for a company ...READ MORE

answered Oct 30, 2018 in Power BI by chiranjeevi
• 160 points
299 views
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
• 41,820 points
45 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
• 41,820 points
80 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
• 41,820 points
59 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 22 in Power BI by Avantika
• 1,500 points

edited May 23 by Omkar 35 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 26 in Power BI by Avantika
• 1,500 points
119 views