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

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.

Reply
guenfood
New Member

Rank by index

Hi,

 

I've got a table with an index column.

To display many text informations in cards, i create measures which could display values according to ranking position.

But this ranking position must be based on index number.

I tried with this measure but i've got a message error "Unable to determine the value of "index". Column does not exist or there is no current row for this column

 

GlobalRANK = RANKX(BDD, [Index])

 

 I had search on the forum and internet but did'nt fin anything to solve my problem.

Is anyone could help me ?

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @guenfood ,

 

According to your description, I did the test reference as follows:

Column = 
"Rank"
    & RANKX (
        FILTER (
            ALL ( 'Table (2)' ),
            'Table (2)'[Index] = EARLIER ( 'Table (2)'[Index] )
        ),
        [Value],
        ,
        ASC,
        DENSE
    )

vhenrykmstf_0-1645597638233.png


If I have misunderstood your requirements, please point out and provide some test data and screenshots of the desired results so that I can fix them as soon as possible. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @guenfood ,

 

According to your description, I did the test reference as follows:

Column = 
"Rank"
    & RANKX (
        FILTER (
            ALL ( 'Table (2)' ),
            'Table (2)'[Index] = EARLIER ( 'Table (2)'[Index] )
        ),
        [Value],
        ,
        ASC,
        DENSE
    )

vhenrykmstf_0-1645597638233.png


If I have misunderstood your requirements, please point out and provide some test data and screenshots of the desired results so that I can fix them as soon as possible. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@guenfood , Seem like you are trying to create a measure, for the measure you need a measure


GlobalRANK = RANKX(BDD, calculate(count([Index])))


Column Rank can be done like

GlobalRANK = RANKX(BDD, [Index])

Thanks for your answer.

I tried with this formula but i don't understand.

It seems to return only one Rank value.

But my index have several lines (actually, 5 lines for a single days), so i must have 5 differents values for RANK.
RANK 1

RANK 2

RANK 3

RANK 4 

RANK 5

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.