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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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