Forum Discussion
Felix_Schulte
4 years agoNew Member
Select latest rows
A background job pushes daily updates into Power BI (push dataset) via REST API.
This looks similar to this:
| Product | Version | Issues | Date |
| ProdA | 1.3 | 10 | 2022/07/21 |
| ProdB | 1.2 | 5 | 2022/07/21 |
| ProdA | 1.4 | 9 | 2022/07/22 |
| ProdB | 1.3 | 6 | 2022/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.:
| Product | Version | Issues | Date |
| ProdA | 1.4 | 9 | 2022/07/22 |
| ProdB | 1.3 | 6 | 2022/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
- johnt75Super User
You could create a table like
Latest Data = var maxDate = MAX('Table'[Date]) return FILTER( 'Table', 'Table'[Date] = maxDate )