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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Top 10 Companies + My Company

Dear ones, I am going around to solve this issue, I have no solicion, and in theory it is simple. I need to make a Ranking or a top of the best 10 Companies on a list, but I want the first position in all the reports to come out the company I am evaluating in the ranking in which it is located.

In the attachment I have the source data and the expected result.

https://drive.google.com/drive/folders/16KwdYP_8f_57tY1QDDPY4M6s7rlKtXBQ?usp=sharing

List

jminanoc_0-1632174623260.png

Expected Result

jminanoc_1-1632174683534.png

Thanks in advance for the support

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin ,

 

In that case you will need two formula.

One for actual rank:

rank = RANKX('Table','Table'[Cap. Bursátil],,ASC)

One for the sort:

Column = IF('Table'[Empresa]="Nike Inc",0,'Table'[rank])

Then filter the column <=10.

5.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Thank you very much, I had not considered it as a column, I was taking it as a measure.

Hi @Syndicate_Admin ,

 

Check the measures.

_cap = SELECTEDVALUE('Table'[Cap. Bursátil])

rank = RANKX(ALL('Table'[Empresa]),[_cap],,ASC)

Measure = IF(SELECTEDVALUE('Table'[Empresa])="Nike Inc",0,[rank])

9.PNG

 

Best Regrads,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Greg_Deckler
Super User
Super User

@Syndicate_Admin Seems like something like:

Ranking Final Column = IF([Empresa] = "Nike Inc", 1, [Ranking] + 1)


Follow on LinkedIn
@ 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...

Thanks for the answer, but with what you indicate, I would show it in the first position with the value 1, and I need to know the actual ranking in which it is, but in position 1.

Hi @Syndicate_Admin ,

 

In that case you will need two formula.

One for actual rank:

rank = RANKX('Table','Table'[Cap. Bursátil],,ASC)

One for the sort:

Column = IF('Table'[Empresa]="Nike Inc",0,'Table'[rank])

Then filter the column <=10.

5.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.