Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello,
I would like to create a chart with the TOP 5 customers who have sent us the most emails per week. I can make a TOP 5 for the last 10 weeks but it takes into account the total number of emails over the 10 weeks and not per week. Would you have a solution to suggest? Thank you for your feedback.
Hi @alefebvre -Hope you already create a new calculated column to extract the week number from your date column as below:
calculated column:
WeekNumber = WEEKNUM('Emails'[Date], 2) -- 2 means the week starts on Monday
create measure to calculate the total emails
EmailsPerWeek =
CALCULATE(
COUNT('Emails'[EmailID]),
ALLEXCEPT('Emails', 'Emails'[Customer], 'Emails'[WeekNumber])
)
Create another measure to rank customers based on the number of emails
CustomerRankPerWeek =
RANKX(
ALL('Emails'[Customer]),
[EmailsPerWeek],
,
DESC,
DENSE
)
create anothe measure to filter
Top5CustomersEmailsPerWeek =
IF(
[CustomerRankPerWeek] <= 5,
[EmailsPerWeek],
BLANK()
)
Hope it works ,please check
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hello,
Thank you for your solution, I will try to adapt my project with your solution. I will still contextualize my project just in case.
As you can see in the image to make my TOP N, I use the following 3 tables:
As mentioned in my previous post, I manage to get the top 5 per week over the last 30 days but over the entire 30 days (see the image below), which does not correspond to my goal which is to make the top 5 per week over the last 30 days.
Again, thank you for your feedback.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 21 | |
| 21 | |
| 21 | |
| 19 | |
| 12 |
| User | Count |
|---|---|
| 59 | |
| 53 | |
| 40 | |
| 30 | |
| 26 |