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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Thulasiram
Helper II
Helper II

How to create an additional column of text

Dear all,

 I have created a Matrix conaining Top N suppliers.

I have created a measure to get the top n.

I wish to create a new column in the matrix wherein I will put

some random remarks against each supplier with a measure.

Need help.  Thanks and appreciate.

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Thulasiram - Create below measure with your main kpi and add text details like remarks for each supplier in a matrix in Power BI using a measure.

 

TopNSupplierRemarks =
IF(
    RANKX(ALL('financials'), [profittotal], , DESC) <= 2,  -- Change 5 to your Top N count
    SWITCH(
        TRUE(),
        SELECTEDVALUE('Financials'[Product]) = "Product A", "Remark for Product A",
        SELECTEDVALUE('Financials'[Product]) = "Product B", "Remark for Product B",
        SELECTEDVALUE('Financials'[Product]) = "Product C", "Remark for Supplier C",
        "Default Remark"
    ),
    BLANK()
)
 

 

rajendraongole1_0-1718785468932.png

 

I have defined rank with 2 , you can change the count as per your requirement.

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
Thulasiram
Helper II
Helper II

Thank you very much @rajendraongole1 .

It solved my problem.  Thanks for taking time in giving the dax code which was very helpful.

rajendraongole1
Super User
Super User

Hi @Thulasiram - Create below measure with your main kpi and add text details like remarks for each supplier in a matrix in Power BI using a measure.

 

TopNSupplierRemarks =
IF(
    RANKX(ALL('financials'), [profittotal], , DESC) <= 2,  -- Change 5 to your Top N count
    SWITCH(
        TRUE(),
        SELECTEDVALUE('Financials'[Product]) = "Product A", "Remark for Product A",
        SELECTEDVALUE('Financials'[Product]) = "Product B", "Remark for Product B",
        SELECTEDVALUE('Financials'[Product]) = "Product C", "Remark for Supplier C",
        "Default Remark"
    ),
    BLANK()
)
 

 

rajendraongole1_0-1718785468932.png

 

I have defined rank with 2 , you can change the count as per your requirement.

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





PijushRoy
Super User
Super User

Hi @Thulasiram 

Please use RANKX for define topn customer https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/ and then define rank wise note in measure with SWITCH statement




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Thank you @PijushRoy 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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