Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am trying to extract the display names of the fields being used in a visual from a Power BI embed. I am using the getDataFieldDisplayName function from the power bi authoring library. However this does not seem to work correctly on Field Parameters.
In the first instance (Image #1) I have dragged a field parameter into a table visual. When i get the datafields in the table visual I can see all the currently selected fields activated by the slicer. But when i try to fetch the displayNames for those fields it returns correctly for the first field but throws an undefined error for the rest.
In a second instance (Image #2)
I have added two fields "Currency" and "FileType" from the Field parameter and a third field "File Name" directly from the model (not from the field parameter). In this case File Name is being returned as the display name for the second "File Type" field.
Could someone please explain this behaviour or suggest any alternative methods to get the display names of the fields accurately. Image #1
Image #2
Solved! Go to Solution.
Hi @rohann,
Thank you for reaching out to the Microsoft fabric community forum.
Field Parameters are dynamic, so they don’t behave like normal columns. Because of that, getDataFieldDisplayName is not able to correctly return the display name for all the fields coming from the parameter.
That’s why you are seeing First field name coming correctly, but others showing undefined and When mixing parameter fields with a normal column, the display name getting mapped incorrectly
So the issue is not with your code. It happens because the API reads static metadata, while Field Parameters switch fields dynamically at runtime. For now, you may need to rely on the information from getDataFields() and handle the display name mapping manually on your side.
Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
Regards,
Community Support Team.
Hi @rohann,
Thank you for reaching out to the Microsoft fabric community forum.
Field Parameters are dynamic, so they don’t behave like normal columns. Because of that, getDataFieldDisplayName is not able to correctly return the display name for all the fields coming from the parameter.
That’s why you are seeing First field name coming correctly, but others showing undefined and When mixing parameter fields with a normal column, the display name getting mapped incorrectly
So the issue is not with your code. It happens because the API reads static metadata, while Field Parameters switch fields dynamically at runtime. For now, you may need to rely on the information from getDataFields() and handle the display name mapping manually on your side.
Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
Regards,
Community Support Team.
Thanks for the prompt reply.
Is this some kind of documented limitation? Since I did not find any. Or is this just found by exploration.
Hi @rohann,
Thank you for reaching out to the Microsoft Community Forum.
No, there isn't any official Microsoft documentation that explicitly states this as a limitation. I simply observed it from my understanding and working knowledge of how Field Parameters work they are resolved dynamically at runtime and how the authoring APIs operate (they rely on static metadata).
Regards,
Community Support Team.
Hi @rohann,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Community Support Team.
Hi @rohann,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.
Regards,
Community Support Team.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |