Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear all,
So what I am looking at is finding out the highest/best Rank for the 'Social network' and the month which had this best Rank. Just attaching a sample data. The original data runs into a million rows for multiple months. Would want a measure ideally to calculate the measure, so that if I have a slicer to Social network and Gender, it would give me the best rank and for which month and the followers in that best ranked month.
Sample data:
Month | Social Network | Gender | New followers |
Jan-20 | Female | 90 | |
Jan-20 | Female | 87 | |
Jan-20 | Snapchat | Female | 71 |
Jan-20 | Tiktok | Female | 68 |
Jan-20 | Tiktok | Male | 99 |
Jan-20 | Male | 96 | |
Jan-20 | Male | 95 | |
Jan-20 | Snapchat | Male | 81 |
Feb-20 | Snapchat | Female | 69 |
Feb-20 | Female | 46 | |
Feb-20 | Female | 45 | |
Feb-20 | Tiktok | Female | 34 |
Feb-20 | Male | 94 | |
Feb-20 | Male | 83 | |
Feb-20 | Tiktok | Male | 31 |
Feb-20 | Snapchat | Male | 29 |
Mar-20 | Female | 86 | |
Mar-20 | Female | 73 | |
Mar-20 | Tiktok | Female | 55 |
Mar-20 | Snapchat | Female | 26 |
Mar-20 | Male | 93 | |
Mar-20 | Tiktok | Male | 92 |
Mar-20 | Snapchat | Male | 76 |
Mar-20 | Male | 41 |
Excepted result:
Social Network | Gender | Best Rank | Month(Best Rank) | Folowers (best Rnk mth) |
Female | 1 | Mar-20 | 86 | |
Male | 1 | Feb-20 | 94 | |
Female | 1 | Jan-20 | 90 | |
Male | 1 | Mar-20 | 93 | |
Tiktok | Female | 3 | Mar-20 | 55 |
Tiktok | Male | 1 | Jan-20 | 99 |
Snapchat | Female | 1 | Feb-20 | 69 |
Snapchat | Male | 3 | Mar-20 | 76 |
Thanks in advance
Regards,
Nithish
Hey,
Thanks for the replies Greg and Amit.
I am able to figure out the measure for the Rank. The problem is I am not able ascertain the best rank for the social networks and the month(best rank).
Please assist based on the sample data shared.
Thanks.
Regards,
Nithish
Seems like you need to do a RANKX and then a MINX or MAXX with appropriate filters.
Check out: https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
and
See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
13 | |
7 | |
5 |