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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Bhavnik
New Member

Power BI embedded - change column display name

Hello,

 

In a Power BI report, we have a Table visual and a slicer. Both, the table and slicer are bound with a Field Parameter.

 

Field parameter looks like this:

Bhavnik_0-1685964816167.png

 

The Table and the Slicer looks like this in Power BI desktop design view.

Bhavnik_1-1685964816170.png

----

Bhavnik_2-1685964830676.png

 

The report, after publishing, looks like below – in the browser.

Bhavnik_3-1685964852668.png

 

In the browser, if I check [Full Name] checkbox in the Slicer then only Full Name column is visible in the Table; When both checkboxes are checked, then both columns/fields are visible in the Table, as shown in above picture. So far so good.

The report, after publishing, looks like below – in the browser.

Business Scenario: This report is embedded on client side in Asp.Net MVC application. The application has thousands of users, and each user can set the name of the column (here, Full Name and Start Time) in their own way. For example, User1 has kept the name of the Full Name column as Employee name; User2 has kept the name of the Full Name column as User name.

I have observed that, Power BI embed APIs can support changing the display name of the columns with this API/code as mentioned below.

Example, pseudo code: myTableVisual.setDataFieldDisplayName(mydatarole, 0, "Employee Name");

https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/display-name

 

Above code gives error: Invalid data field index, index is out of range.

To me it seems that, Field Parameters are not recognized the setDatFieldDisplayName function by the embedded API (here, in TypeScript language). If I put a table column (instead of Field Parameter) in the Table visual and then if try to change the display name of that column, then the API works.

 

In below image, User Action is a column of a table (and Field is a Field parameter).

Bhavnik_4-1685964876768.png

 

I believe, if I can get the solution to set the display name for field parameters in the Table visual, then the same solution should also be applicable in the Slicer as well. 

 

Please advise how to fulfill the business scenario that I have.

 

Thanks in advance,

Bhavnik

0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors