Forum Discussion

Felix_Schulte's avatar
Felix_Schulte
New Member
4 years ago
Solved

Select latest rows

A background job pushes daily updates into Power BI (push dataset) via REST API.

 

This looks similar to this:

 

ProductVersionIssuesDate
ProdA1.3102022/07/21
ProdB1.252022/07/21
ProdA1.492022/07/22
ProdB1.362022/07/22

 

I'd like to show in a report the current issue status (aside from historical data as well).

 

Option 1)

I.e. id like to filter the table (into an intermediate virtual table) so that it only shows the latest values.

In other words: Find the latest_date; Then throw out any rows, where the Date column does not match the latest_date.

E.g.:

ProductVersionIssuesDate
ProdA1.492022/07/22
ProdB1.362022/07/22

 

Option 2) If easier, I could always override a "current status table" each day. (I also do not know, how to accomplish that. Maybe do a secuence of CleanTable(); PushDataToTable();?)

 

How would I do this?

  • You could create a table like

    Latest Data =
    var maxDate = MAX('Table'[Date])
    return FILTER( 'Table', 'Table'[Date] = maxDate )

1 Reply

  • You could create a table like

    Latest Data =
    var maxDate = MAX('Table'[Date])
    return FILTER( 'Table', 'Table'[Date] = maxDate )