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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
amdi_silword
Frequent Visitor

How to get NAMEOF to return an Amount in a Matrix

I have this code which create a new Table.

FP - X-axis = {
    ("Avg. Selling Price", NAMEOF('Sales'[Avg. Selling Price]), 0),
    ("Margin %", NAMEOF('Sales'[Margin %]), 1),
    ("Sales YoY", NAMEOF('Sales'[Sales YoY]), 2),
    ("Sales PY", NAMEOF('Sales'[Sales PY]), 3),
    ("Sales", NAMEOF('Sales'[Sales Amount]), 4)
}
If I place ex. Continent in a Matrix and The name of the table FP - X-axis in the value then will all the row names be placed in the Matrix and the amount for each row.
But I can't reproduce it by copy the code and create a New Table, so it works in a Matrix in my own dataset.
In the data section in the right section of the screen there is a little icon which I don't know how to get. I think that the resason it works but I can not recreate so it works.
Icon.png
And a picture from the table:
 FP - X-axis.png
The Matrix look like this where the name of the first column is placed in Value in the Matrix
Matrix.png
Does anyone know how it might work.?
 
 
1 ACCEPTED SOLUTION
vicky_
Super User
Super User

The code snippet you posted is from the Fields Paramter feature - https://www.sqlbi.com/articles/fields-parameters-in-power-bi/. I suggest using the button to create those tables and then editing the table code yourself.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @amdi_silword ,

 

Did @vicky_  reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best Regards,
Adamk Kong

vicky_
Super User
Super User

The code snippet you posted is from the Fields Paramter feature - https://www.sqlbi.com/articles/fields-parameters-in-power-bi/. I suggest using the button to create those tables and then editing the table code yourself.

vicky, Thanks for your help

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.