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

Filtering duplicates in funcion of a date column

$
0
0

Hi everyone,

 

I've tried to solve this issue on my own and then looking for an already solved post related to this but I wasn't able to find it, sorry in advanced if it has been already solved.

 

The issue is that I have a table where the key code field is duplicated in some rowsand I want to keep just one row per key code with all the values related to this specific row. For each duplicated key code, which row do I want to keep? I want to keep the row that was first created (info stored in the column data). Attending to the last point, just eliminating duplicates in the query editor is not an option.

 

To come up with a solution I'm exploring two ways:

  • Calculated Table: I've tried to create a filtered table through SUMMARIZE function but using the function like this: SUMMARIZE('original_table';'original_table'[keyCode];"Date";FIRSTDATE('original_table'[date].[Date])) I manage to get the first date per each group of duplicate key codes but then, when I try to get any othe fields (SUMMARIZE('original_table';'original_table'[keyCode];"Date";FIRSTDATE('original_table'[date].[Date]);"yyy";'original_table'[yyy])) I cannot get the fields related to the row where the first date is.
  • Calculated Column: Trying to create a boolean column, with a True or False in each row depending on that row was the one to be selected (conditions already explained).

I hope I explained correctly, if you need any extra explanation please ask.


Any tip will be more than welcome.

Thanks a lot for your time!


Viewing all articles
Browse latest Browse all 213819

Trending Articles