Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
telusive
Frequent Visitor

Looking for Top 10 but filtered week over week.

Hello! Currently I have parts of this working, just not together. I have a DAX formula for the rank:

UserHits = RANKX(ALLSELECTED('Users'[Users]),[TotalNumbers], ,DESC)

It actually is working fine, however, when I change my graphic to incorporate my date calendar, it is ranking the top 10 users from the period of time selected. My goal is to have the users be a small multiple, so you will see the top 10 users that week for the last 6 weeks. Right now you get 10 total users over the last 6 weeks. So, occasionally there are blanks. As this user had data and was a top user last week, but not the week prior.

What do I need to do to accomplish this? 

Thanks!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@telusive , If you are using Small multiples the you should 10 for each small multiple

 

 

use a measure like

try like

calculate([TotalNumbers],keepfilterS( topn(10, ALLSELECTED('Users'[Users]), [TotalNumbers],desc) ))

 

 

if need for all 6 week

 

have meausre like

 

M1 = calculate([M1], allselected(Date[Week]) )

 

calculate([TotalNumbers],keepfilterS( topn(10, ALLSELECTED('Users'[Users]), [M1],desc) ))

 

TOPN: https://youtu.be/QIVEFp-QiOk
TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@telusive , If you are using Small multiples the you should 10 for each small multiple

 

 

use a measure like

try like

calculate([TotalNumbers],keepfilterS( topn(10, ALLSELECTED('Users'[Users]), [TotalNumbers],desc) ))

 

 

if need for all 6 week

 

have meausre like

 

M1 = calculate([M1], allselected(Date[Week]) )

 

calculate([TotalNumbers],keepfilterS( topn(10, ALLSELECTED('Users'[Users]), [M1],desc) ))

 

TOPN: https://youtu.be/QIVEFp-QiOk
TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448

You were correct, the issue was something to do with the date itself, which I took for granted was correct. Thank you for your time. 

Hey! So, the issue I have with the above is this:

Measure = calculate([Total],keepfilterS( topn(10, ALLSELECTED('Users'[User]), [Total],desc) ))



I am using the first linked measure, and you can see that several week starts have less than 10 users. I assume this is because it is looking at the top 10 for the entire dataset? The only filter I have is on the date is in the last 6 weeks. I confirmed it's not just tiny by swapping them to log and still I see (this is 3 of the 6 weeks)

telusive_1-1709757156568.png
When I swapped to the second video logic, It's different, but the same concept. 

 

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.