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.
Hello
I'm a french newbie with PowerBi.
I'm a bit lost with rankx. Here is my problem
For each car number I want to calculate these two columns:
- Lap time ranking
- stint number : each stint ranking (a stint is each time the car go on track, separated per a box entry "B")
here is an example with 2 cars
thanks
car N° | lap time | Box | lap time ranking | stint number |
3 | 55.8 | 5 | 1 | |
3 | 55.7 | 4 | 1 | |
3 | 55.2 | 2 | 1 | |
3 | 58.9 | B | 8 | |
3 | 56 | 7 | 2 | |
3 | 55.4 | 3 | 2 | |
3 | 54.8 | 1 | 2 | |
3 | 57.4 | 6 | 2 | |
7 | 55.8 | 5 | 1 | |
7 | 55.7 | 4 | 1 | |
7 | 55.2 | 2 | 1 | |
7 | 59.0 | B | 8 | |
7 | 56 | 7 | 2 | |
7 | 55.4 | 3 | 2 | |
7 | 54.8 | 1 | 2 |
Hi @Yannick63,
Based on my test, you could refer to below formula to calculate the rank:
Rank = RANKX('Table1','Table1'[lap time],,ASC,Dense)
But I could not figure out the logic of how to calculate the stint number, could you please offe me more information about it?
Regards,
Daniel He
Hello @v-danhe-msft
thanks for your help.
1-
Because my database is with a lot of data I have this error message :
A single value for column ' Lap Time' in table 'Table 1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
2-
The stint calculation is just
1st stint is from 1st lap time until B in box column
2d stint is after the 1st B (Box) you find until the 2d B you find or until next car
I hope it's clear now.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |