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 friends
I would like to display the count of TOP 3 count of Staff. I cannot get it right.
My table is as below
John
John
John
John
Rob
Rob
Rob
Rob
Bill
Bill
Alex
Sam
Dough
I would like a table visual to show top 3 count of staff - Only these 3 to be displayed
Name Count
John 4
Rob 4
Bill 2
Appreciate some help. Thanks.
Solved! Go to Solution.
Hi @Jaweed ,
HYG -
@Anonymous Thanks
If the records are filtered on a weekno ( on each row), how can we adapt the rankr.
Ie
Name weekno
Bob 5
Bob 5
Bob 8
Bob 4
Tim 5
Tim 5
Tim 5
Tim 5
Bill 5
Top 2 filtered by weekno ( as per a slicer say weekno between 4 and 5). Output is for Top 2, we should get
Name Count of Name
Tim 4
Bob 3
Only these 2 records should appear.
Thanks to help in when filtering is added. I am figuring how to mahe first a virtual table and have the Top 2 on it, but cannot get it to work.
The "ALL" in the DAX formula in filtering causes visual not to display correct records.
The code, not the names. Let's see the DAX
Thanks @littlemojopuppy
I cannot get the dax right. Can you please assist me. Thanks
This is going to be pseudocode but it should be pretty close
TOPN(3, SUMMARIZE(Table, Table[Name], "NameCount", COUNT(Table[Name])), NameCount)
Hi does not work properly. All records are populated, unless I am doing it wrong. I have the impression it gives the count , but I want the top 3 records to be populated. I cannot use filter inthe filterpane.
one more
create measure Count:
Count = calculate(count('Table'[Name]))
next create measure r:
r = rankx(ALL('Table'[Name]);calculate(COUNT('Table'[Name]));;;Skip)
next do this
do not hesitate to kudo useful posts and mark solutions as solution
Linkedin
Can you paste the code you're using?
Thanks.
Measure = TOPN(3, SUMMARIZE('attendance18-22', "Name", COUNT('attendance18-22'[Name])), [Name])
Try this:
Measure = TOPN(3, SUMMARIZE('attendance18-22', 'attendance18-22'[Name], "NameCount", COUNT('attendance18-22'[Name])), NameCount)
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 |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |