cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
renecernitz
Frequent Visitor

Rank the frequency of text type column (DAX/Power BI)

Hi,

 

I'm trying to figure a rank table based on this table

renecernitz_0-1629923786337.png

 this table (raw_table) has a column with repeated tags.

 

I want a table like this one:

renecernitz_1-1629924006586.png

 

First, I tried to create a measure to calculate the frequency of each tag using COUNTA funtion

Freq = COUNT('Raw_table'[tags])

Then I used the RANKX funtion

Ranking = RANKX('Raw_table',[Freq],,DESC,Skip)
 
Only numbers "1" appear
 
 
Thanks for your advices
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@renecernitz here is the updated measure and the result

 

Ranking = RANKX(ALLSELECTED('Tags unique table'[TAGs unique]),[Freq],,DESC,Skip)

 

parry2k_0-1629929166886.png

 

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@renecernitz no problem, it happens sometimes. Glad it is working for you now. Cheers!!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@renecernitz here is the updated measure and the result

 

Ranking = RANKX(ALLSELECTED('Tags unique table'[TAGs unique]),[Freq],,DESC,Skip)

 

parry2k_0-1629929166886.png

 

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2k 

 

Thank you so much. I don't know how I missed something so simple. 😞

parry2k
Super User
Super User

@renecernitz seems like I'm missing something, very hard to make out from these images, share pbix file with sample data, remove sensitive information before sharing.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2k 

 

I used a wetransfer link to share it cause I'm new in this forum and It doesn't allow upload .pbix files

 

https://we.tl/t-KAbJj1iJhk

 

Thanks

 

parry2k
Super User
Super User

@renecernitz try this:

 

Ranking = RANKX(ALLSELECTED('Raw_table'[Tags]),[Freq],,DESC,Skip)

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Thanks for your fast reply but,

 

It doesn't work

 

renecernitz_0-1629925663652.png

 

 

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.