cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Row difference (moving range)

Sebnem
Level II

Hello,

 


Can you help how to write a formula for row difference? My problem with the formula is that I have a variable column "Partnumber" and I don't want the row difference calculated if the next row has a different partnumber than the current row. Please find a sample table. In row number 30, the part number is different than the previous row. For row 30, I don't want the calculation but then continue as long as the next rows
 have the same part number as row 30 and so on.

2 REPLIES 2
ih
Super User (Alumni) ih
Super User (Alumni)


Re: Row difference (moving range)

I think an if statement will do what you want, see the column formula below.  This will return zero for row 30, you might prefer a missing value.

 

If( :Epi_Product_Number == Lag( :Epi_Product_Number, 1 ),
	Dif( :"Mean(Average)"n ),
	0
)
Sebnem
Level II


Re: Row difference (moving range)

thank you very much. It worked very well.