The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everyone!
I'm working with basketball data (basketball games) and I calculated the points scored by a player for the last game and the average excluding that game with measures. When new data is added, the calculation is refreshed, calculating again the values to be updated.
I would like to do the same but not for the last game, I would like to take the last 5 games and do the same calculation (that should be recalculated when entering new data). The logic should be the same (using Date column) to the calculations below (to interact with filters correctly). I tried with TopN in a measure changing the order but not working.
Add a link with a pbix file where you can find the dataset and the measures already calculated (I can't add the pbix directly yet) : https://drive.google.com/drive/folders/1unoNI2WMIM3Jta-Q9DzbOg3Ie1gTtECc
Could you give me advice, please? Thx in advance.
The calculations made (and working for the last game and all except last game):
Solved! Go to Solution.
HI @sfernamer,
Perhaps you can take a look at the following link about similar requirement if its formula work on your report:
Solved: Calculate average on the last 10 dates/records in ... - Microsoft Power BI Community
Regards,
Xiaoxin Sheng
Hi @v-shex-msft
Thank you for your reply. I tested it on my pbix and, after editing a bit the formula, it worked. The final formula is the following one (I add the Date and Competition because I'm interested in recalculating depending on competition).
HI @sfernamer,
Perhaps you can take a look at the following link about similar requirement if its formula work on your report:
Solved: Calculate average on the last 10 dates/records in ... - Microsoft Power BI Community
Regards,
Xiaoxin Sheng
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
20 | |
17 | |
15 | |
13 |
User | Count |
---|---|
42 | |
36 | |
23 | |
22 | |
17 |