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

Be 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

Reply
danning1234
Advocate I
Advocate I

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 measureand not a calculated column, because the rows are also filtered by other columns in the matrix), and then the 1st matrix shows results from 1 to 50 rows and the 2nd matrix shows from 51 to 100 rows. The result of the row numbers should not be changed in the 2nd matrix, because there we want to just apply the measure as filter, measure result from 51 to 100, and 1 to 50 for the 1st matrix.

 

One thing to mention, is that, the column Region_En is from a dim table, but the BDLName is from the fact.

Filters on the matrix, are, from 2 other dim tables and the fact table.

 

danning1234_0-1620930367355.png

 

Any idea?

 

Thank you!!

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

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
    )
)

matrix1.PNGmatrix2.PNG

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.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

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
    )
)

matrix1.PNGmatrix2.PNG

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.

The solution matchs already 99% of my senario. I just change a bit to make it work for my matrix.

EXCELLENT!!

And THANK YOU!!

 

Danning

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.