March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hey Guys,
I want to rank the name of persons. An example is given below.
I have different people with different types and different speeds on different dates and times.
I want to know which persons have the highest speed with the same type.
I don't know how to use the rank function properly because if i use the max or min it returns 1 as value, but i want the actual speed of the person.
Hi @Smits474,
Please try below formulas:
Rank = RANKX ( ALLEXCEPT ( TableRank, TableRank[Type] ), LASTNONBLANK ( TableRank[Speed], MAX ( TableRank[Date] ) ), , DESC, DENSE ) MaxSpeed = CALCULATE ( MAX ( TableRank[Speed] ), ALLEXCEPT ( TableRank, TableRank[Type] ) )
If you still have any question, please feel free to ask.
Best regards,
Yuliana Gu
I want to have multiple tables outcome, with different tops.
I have made a new datasheet and i have made tables of what i want to be is the outcome.
The datasheet is:
:
In this situation, i sliced on the name 'Peter', type 'B' and date '15-02-2016'.
For 1: I want to know the top 5 of speed of all time with the same gender & type as Peter.
For 2: I want to know the top 3 of speed with the angle of all time with the same gender & type as Peter.
For 3: I want to know the top 2 of speed of the previous measure off Peter.
I want all the outcomes in one page, so top N filtering isn't a solution.
I've tried the top N funtion but it gives me this error: 'The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.'
I'm not on my PC, but from memory.
Add a slicer and select one of the types
Create a table and add the names
write a measure like this.
Rank = rankx(all(tablename[name]),max(tablename[speed])). This should give the order (i.e. Rank).
If you just want the speed, just use
=max(tablename[speed])
When i use this rank, it only gives all the different persons rank 1
sorry, that was a silly mistake. Try this
Rank = rankx(all(data[Name]),CALCULATE(max(data[Speed])))
Same problem. And i only get the values of the person who is selected in my slicer, but i want all the other persons too. Maybe the top n function is better to use?
I tested this measure. If you put people on rows of a table, and a slicer on the type, it will give you the rank for each person.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
105 | |
98 | |
65 | |
54 |