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

lap time rankx

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 timeBoxlap time rankingstint number
355.8 51
355.7 41
355.2 21
3 58.9B8 
356 72
355.4 32
354.8 12
357.4 62
755.8 51
755.7 41
755.2 21
7 59.0B8 
756  72
755.4 32
754.8 12
2 REPLIES 2
Community Support Team
Community Support Team

Re: lap time rankx

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

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yannick63 Frequent Visitor
Frequent Visitor

Re: lap time rankx

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.