I have a dataset in which I need to find the 5 most recent prices and display them in a table in Power BI. Here is a sample:
I would like to show 4.5, 5, 3.5, 4, and 6 in a table because those prices correspond to the 5 most recent dates. This will, of course, apply to multiple items, but this is a sampling.
Solved! Go to Solution.
Hi @pbiuser2 ,
Is this problem solved?
If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, please let me know.
@camargos88, this solved it! Thank you very much. I was able to add my fields to a Matrix and, with a few adjustments, create the desired result.
@parry2k , thank you for the link. I have heard of both the RANK and TOPN functions, but I am unsure how to apply them in this scenario. They have always given me a bit of trouble.
@parry2k , I do appreciate the steps you sent and love Russo's work, but a post like this from an advanced DAX guru is only clear if (1) your use-case matches his closely (e.g., a Sum of values similar to sales), or (2) you have an inkling about how ISINSCOPE, CALCULATETABLE, ALLSELECTED, and the RANKX functions are operating in the formulae provided and also have a dataset that is aligned with this scenario.
I do not have either and have been unable to implement the steps listed. For one thing, it is quite hard if one does not know what to use in his own dataset to replace the fields in the DAX formulas.
We are excited to announce the Power BI Super Users!
Overview of Power BI 2020 release wave 2!
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.