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

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.

Reply
pbininja
Frequent Visitor

Best Rank within category

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:

MonthSocial NetworkGenderNew followers
Jan-20InstagramFemale90
Jan-20FacebookFemale87
Jan-20SnapchatFemale71
Jan-20TiktokFemale68
Jan-20TiktokMale99
Jan-20FacebookMale96
Jan-20InstagramMale95
Jan-20SnapchatMale81
Feb-20SnapchatFemale69
Feb-20FacebookFemale46
Feb-20InstagramFemale45
Feb-20TiktokFemale34
Feb-20FacebookMale94
Feb-20InstagramMale83
Feb-20TiktokMale31
Feb-20SnapchatMale29
Mar-20FacebookFemale86
Mar-20InstagramFemale73
Mar-20TiktokFemale55
Mar-20SnapchatFemale26
Mar-20InstagramMale93
Mar-20TiktokMale92
Mar-20SnapchatMale76
Mar-20FacebookMale41

 

Excepted result:

Social NetworkGenderBest RankMonth(Best Rank)Folowers (best Rnk mth)
FacebookFemale1Mar-2086
FacebookMale1Feb-2094
InstagramFemale1Jan-2090
InstagramMale1Mar-2093
TiktokFemale3Mar-2055
TiktokMale1Jan-2099
SnapchatFemale1Feb-2069
SnapchatMale3Mar-2076

 

Thanks in advance

 

Regards,

Nithish

3 REPLIES 3
pbininja
Frequent Visitor

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

Greg_Deckler
Super User
Super User

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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors