Forum Discussion
Plot latest data only
- 10 years ago
gdssiqueira Here's the alternative to DAX,
In power bi desktop go to query editor, right click your table -> Duplicate.
For duplicated table click Group By as below.
This will give you date with latest time. Then click Merge Queries and merge it as below.
Expand new column to include Value column as below and Close & Apply. You will have two tables the second one will have data you want and every time you refresh both tables will be updated.
Thank you for your suggestions. I will try them and then get back with the results. The data filtering has to be dynamic through PowerBI, since the database is automatically updated.
Wow, thank you for the guide with screenshots. That's super helpful! One more question: in my case, date and value are not on the same table, I just presented you with a simplification of the problem. Perhaps I oversimplified, let me try to be more accurate.
Table1 has:
ID Date Time and other info not relevant to the problem
Table2 has:
ID Type Value Time and other info not relevant to the problem
ID and Time are the same for both tables(PK for the first, FK for the second), so I'd like to plot, say, Values over Dates - filtering by type of value using a Slicer. One ID is only linked to one Date, so that's not to worry (although there are multiple IDs that happened on the same date) and each row in the first table might be related to one or more rows in the second table (different values for different value types). Would that significantly change the solution?
Thanks once again!