Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Compare 2 rows

$
0
0

Hi guys,

 

I've two rows that I want to compare:

 

Scenario 1:

 

In this scenario I want:

- According to the two DateTime most recent, If row 1 from Code = row 2 from Code, I get "False", but, if row 1 from code is different from row 2 from code, and QtdDateInv is null I get "True".

 

Scenario 1 - I want to get "False":

 

 

Customer          DateTime          Code          QtdDateInv
C00001          04-02-2017         5245             
C00001          02-01-2017         5245             15-01-2017
C00001          25-11-2016         5240             30-11-2016
C00001 12-05-2016 987798 15-05-2016

 

Scenario 2 - I want to get "True":

 

 

Customer          DateTime          Code          QtdDateInv
C00031          04-02-2017         6200             
C00031          02-01-2017         5245             15-01-2017
C00031          25-11-2016         5240             30-11-2016
C00031 26-01-2016 45455240 31-01-2016

I think that I need to get a mease/calculated column to get the last two Datetime and compare the code. I accept suggestions.

Ty.

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>