A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
"The data must be prepared, which is not that easy. "
Also, your comment above, could you explain this for me?
As I don't have experience with power pivot, so not sure how to handle this data from the start.
Sample file updated, Recent date bug fixed.
I prepared the data using Power Query, you can not just load the data into Power Pivot / Data Model and get the result. (To be honest, this may be possible, I am not an expert on DAX. But I have enough experience to be sure that this is very complicated.)
In my file are 4 queries to make it simple. The Data query simply load the data as connection only. The Recent query refers to the Data query, group the data by the max. Date and get the related Price.
The MinMax query is nearly the same, but does 2 aggregations to find the min./max. Price and get the related Date.
The final query is the Model query, in this query I combined the Recent and MinMax query using a left outer join, same way as Herbert does in his file. This query is loaded into the Data Model, all others are a connection only.
With my preparation I'm done and I can create a Pivot table and drag the fields wherever I want.
Herbert's solution is similar, he has created some measures to find the results.
If this is all new to you, then the easiest way is to copy your data into the table in my example file, click Data \ Refresh All and you're done.
Do not change the headers of the table, that breaks the queries and so the model!
Andreas.