Forum Discussion

danning1234's avatar
danning1234
Advocate I
5 years ago
Solved

Row number in Matrix

Hi,   We have a matrix and it has many rows. We want to show this matrix into 2 parts so users dont have to scroll up and down to see all data.   So i want to add a row number to the matrix (a m...
  • Icey's avatar
    5 years ago

    Hi danning1234 ,

     

    Please check if this measure works in your scenario, too.

    Rank = 
    IF (
        [Avg] <> BLANK ()
            && HASONEFILTER ( Class[Class] ),
        RANKX (
            ALL ( Class ),
            RANKX (
                ALL ( School ),
                CALCULATE ( SELECTEDVALUE ( School[School] ) ),
                ,
                ASC,
                DENSE
            ) * 100
                + RANKX (
                    ALL ( Class ),
                    CALCULATE ( SELECTEDVALUE ( Class[Class] ) ),
                    ,
                    ASC,
                    DENSE
                ),
            ,
            ASC,
            DENSE
        )
    )
    

    For more details, please check the attched .pbix file.

     

     

     

    Best Regards,

    Icey

     

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