Most recent unique child records list.

I have a child table with DateTime stamp like the following:

Screen Shot 2022-08-16 at 20.35.30.png

It gets updated by a webhook everytime there is an update.

I´d like to show a list of the most recent child records which are not repeated at the parent view.

Any help will be greatly appreciated

Solved Solved
0 9 271
1 ACCEPTED SOLUTION

Ok, that's a weird one.

I suggest you to add a new column called something like [pseudo_id] to make things easier. This new column would have all of the values from the columns you need to check to make something like a "Computed key". I also suggest to remove spaces, so:

SUBSTITUTE(
 CONCATENATE(
  [Column_1],
  [Column_2],
  [Column_3],
  [Column_4],
  [Column_n],
 ),
 " ",
 ""
)

 Then, your slice could have something like this on the row filter condition (please test and come back):

[DateTimeColumn]
=
MAX(
 SELECT(
  YourTableName[DateTimeColumn],
  [_THISROW-1].[pseudo_id]=[pseudo_id]
 )
)

 

View solution in original post

9 REPLIES 9


@jairod wrote:

I´d like to show a list of the most recent child records which are not repeated at the parent view.


You want:

  1. Most recent child records
  2. Unique values
  3. On the parent Detail View

?

I confirm the 3 points are correct.

Ok, easy enough.

But! What's the criteria to say that certain record is repeated? After that, I can help you make a slice and a List column (aka [Related whatever])

A repeated record is all the columns repeated except the DateTime.

Ok, that's a weird one.

I suggest you to add a new column called something like [pseudo_id] to make things easier. This new column would have all of the values from the columns you need to check to make something like a "Computed key". I also suggest to remove spaces, so:

SUBSTITUTE(
 CONCATENATE(
  [Column_1],
  [Column_2],
  [Column_3],
  [Column_4],
  [Column_n],
 ),
 " ",
 ""
)

 Then, your slice could have something like this on the row filter condition (please test and come back):

[DateTimeColumn]
=
MAX(
 SELECT(
  YourTableName[DateTimeColumn],
  [_THISROW-1].[pseudo_id]=[pseudo_id]
 )
)

 

I was able to list the most recent items by using the following formula in a filter:


DateTimeColumn]
=
MAX(
 SELECT(
  YourTableName[DateTimeColumn],
  [_THISROW-1].[pseudo_id]=[pseudo_id]
 )
)​

However the concatenate formula in the virtual column of the source table did not allow for the filter to work properly. Anyone´s guess why is as good as mine.
And it did work using a concatenate formula directly in the source spreadsheet table.


@jairod wrote:

the concatenate formula in the virtual column of the source table did not allow for the filter to work properly.


Can you explain that a little bit more accurate?

I checked my formulas and was missing the

SUBSTITUTE(

Before concatenate.

I fixed that and it works.

Top Labels in this Space