Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
sactl
Contributor
Contributor

Filter rows depending on key field value

Hi all,

 

I've got rows with 2 key fields (key value is 'A' or 'B' and a date field). There could be a row with 'A' or 'B' or both per every date.

 

Now I want to filter the data flow so that I get one row per every date:

If there is only a row with key 'A' take the 'A' row. 

If there is only a row with key 'B' take the 'B' row. 

If there are 2 rows with key 'A' and 'B', take the 'A' row. 

 

I could not figure out how to check if there are 2 rows for one date and then filter the other one out.

 

Thank you in advance for any ideas

Regards

Labels (2)
1 Solution

Accepted Solutions
fdenis
Master
Master

for each line calculate an orderByColumn.
(A!=null)?1:2
so if you have A it's 1 ifnot then 2
sort your data dy date and orderByColumn.
then aggegate data keeping only the first line by date.

good luck

View solution in original post

1 Reply
fdenis
Master
Master

for each line calculate an orderByColumn.
(A!=null)?1:2
so if you have A it's 1 ifnot then 2
sort your data dy date and orderByColumn.
then aggegate data keeping only the first line by date.

good luck