Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
Data:
ID | User | Date |
1 | Bob | 1/1/2020 |
2 | Sam | 1/2/2020 |
3 | Sam | 1/3/2020 |
4 | Bert | 1/4/2020 |
5 | Sally | 1/5/2020 |
6 | Sally | 1/6/2020 |
7 | Tom | 1/7/2020 |
8 | Bob | 1/8/2020 |
9 | Tom | 1/9/2020 |
10 | Sally | 1/10/2020 |
11 | Bert | 1/11/2020 |
12 | Billy | 1/12/2020 |
13 | Bob | 1/13/2020 |
Scenario:
- How would I show the top user or users in the case of tie?
Tried:
- TOPN, RANKX but can't seem to get the syntax correct.
Want:
- A tile in the report: "Top Users: Sally, 3 sessions, Bob: 3 sessions"
Any help is appreciated. Thank you!
Solved! Go to Solution.
Hi,
This measure works
Measure = "Top Users: " & CONCATENATEX(TOPN(1,VALUES(Data[User]),[User count]),Data[User]&", "&[User count], " sessions, ")&", sessions"
Hope this helps.
Hi @ericOnline ,
Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help anyone in the community find the solution easily if they face the similar problem with you. Thank you.
Best Regards
Rena
Hi,
This measure works
Measure = "Top Users: " & CONCATENATEX(TOPN(1,VALUES(Data[User]),[User count]),Data[User]&", "&[User count], " sessions, ")&", sessions"
Hope this helps.
And this is good if you want to use a single row card...
Thanks
1. Add a separate table for the users (User in my example) with just the user name and join to the fact table on user.
2. Create a measure in your fact table (named Sessions in my example) to count the number of times a user is identified: e.g.
Session_Count = COUNT('Sessions'[User])
3. Create a measure in the User table to rank the users e.g.
User_Rank =
IF (
ISINSCOPE ( 'User'[User] ),
IF (
NOT ( ISBLANK ( [Session_Count] ) ),
RANKX ( ALL ( 'User' ), [Session_Count],, DESC, DENSE )
)
)
Thank you for the expertise. Working on this now...
1. Created a new table of unique users
It works fine using a multi row card. Have you tried that?
The visual below might be helpful...
Thanks
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |