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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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