Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

topn

ResolvedVersion 2016

TopN

Hi,

I'm trying to find the top5 of a list of prospects. I have managed to use Rank x to get the top five prospects to show, byt they're not in the correct order. My current measure is

Top5Prospects = Calculate([Projections],filter(VALUES(Prospects[Name]),if(rankx(all(Prospects[Name]),[Projections],,DESC)<=5,[Projections],blank())))

We covered this in training using TopN but I can't quite remember!

RE: TopN

Hi Lou,

Thank you for the forum question.

When you write that you do not get them in the right order, do you mean that in a visual, you do not get them in descending order. If this is the case you just need to sort the visual descending.

We used the Topn function on the course.

May be try something like

Top5Prospects = Calculate([Projections],Topn(5,all(Prospects[Name]),[Projections],DESC))




Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: TopN

Hi Jens,

Thanks! I think it's working now!

Lou

 

Training courses

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Power BI tip:

Implement Row-Level Security (RLS)

If your reports contain sensitive information, implement Row-Level Security to control access to data at the row level. RLS allows you to define rules that restrict data access based on user roles, ensuring that each user sees only the relevant data according to their permissions.

View all Power BI hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.