• Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Call Us Today! 512-640-5750
Data Architect as a Service | Remote DBA Services
  • Services
    • Analytics Architecture
    • Database Architecture
    • Software Architecture
    • Microsoft Fabric Consulting
      • Microsoft Fabric Health Check
  • About Us
    • Testimonials
    • Recommendation Program
    • Jobs
      • Data Engineering Consultant
      • Principal Data Analytics Architect
  • Resources
    • Blog
    • Videos
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Meagan Longoria

Semantic Link Labs with Power BI: Finding fields used in a Power BI report in PBIR format

Power BI, Python

Have you ever wondered where a certain field is used in a report? Or maybe you need an easy way to find broken field references in a report? Certain 3rd-party tools such as Measure Killer and Power BI Helper (not updated recently) have helped us with this task in the past. But now we can perform this task with a notebook in Fabric! Lets take a look in this month’s Data Architecture tip.

This is made possible by the Semantic Link Labs Python library. Please note that PBIR format is still in preview at the time of publishing this blog post, so use it at your own risk. Also, this works only on reports published to the Power BI service. Since this notebook is not making any changes to the report, I feel it’s pretty safe to run, but do remember that it uses CUs on your Fabric capacity while you run it.

Using Semantic Link Labs with Power BI

To use the Semantic Link Labs package in your notebook, you need to install it and import the subpackages you need. You can also create an environment with Semantic Link Labs installed, and then you can skip the install step.

If you need to install and import, you would just write some Python like this:

%pip install semantic-link-labs

import sempy_labs as labs
from sempy_labs import report as rep
from sempy_labs.report import ReportWrapper

The important functions used in my field usage notebook are:

  • list_semantic_model_objects
  • list_visuals

The list_semantic_model_objects function shows a list of all semantic model objects (measures, columns, hierarchies) that are used in a report and where the objects were used (i.e. visual, report filter, page filter, visual filter). It has a parameter that allows you to add an extra column that identifies whether the semantic model object used in the report exists in the semantic model which feeds data to the report.

The list_visuals function shows a list of visuals in a specified report.

I call these two functions and merge the results to give you a nice field usage list.

Using My Notebook

I created a notebook (download from Github here) that combines the Semantic Link Labs functions with some basic Python to allow you to do the following:

  • See a list of all fields and where they are used in a report
  • Search for a specific field to see where it is used in a report
  • Search for fields from a specific table to see where they are used in a report
  • Search for broken field references (i.e., the measure in the semantic model was renamed and the report was not updated)

You’ll find documentation and instructions at the top of my notebook to help you use it. First, read the documentation.

Then skip or run the install step as needed. Run the import step to get all the required libraries for the notebook to work.

The third code cell in my notebook creates some widgets to accept input for which report and fields you would like to search. You must enter at least the report name and workspace name. You may optionally specify a table name alone, or a table name and field name. By default, the notebook will look for all fields, whether they are valid or invalid (broken field reference). Change the selection if you would like to see only valid or only invalid.

The last cell of the notebook returns a table with the following columns:

  • Table Name – the table in which the field is located
  • Object Name – the field name
  • Object Type – indicates whether the field is a measure or column
  • Report Source – The part of the report in which the field is used (visual, report filter, etc.)
  • Report Source Object – The name of the object in which the field is used (usually the report name, page name, or visual name)
  • Valid Semantic Model Object – true/false as to if the field reference is valid
  • Page Name – unique ID of the page within the report where the field is used
  • Page Display Name – the page name you see in Power BI where the field is used
  • Visual Name – if the field is used in a visual, the unique ID of the visual where the field is used
  • Display Type – if the field is used in a visual, the type of visual where the field is used; e.g., Bar chart, Slicer, HTML Content (lite)
  • Visual Loc X – if the field is used in a visual, the x-coordinate of the visual
  • Visual Loc Y – if the field is used in a visual, the y-coordinate of the visual
  • Visual Loc Z – if the field is used in a visual, the z-order of the visual

If I have a report named WOW2024Wk37 and I want to see where all the fields in the __Measures table are used, I can enter that information and run the final cell.

the notebook widgets allow input for report, workspace, table, field, and invalid fields. The selection shows a report, workspace, and table entered. The field widget is blank, and invalid fields is set to all fields.

My results will help me see things like my [Color – CY] measure is used on the Sales Report page in a card, a bar chart, and a custom column chart. If I need to find the visual in the report, I can look at the x and y coordinates to give me an idea of where to look.

The results table in the notebook shows all 25 rows where fields from the __Measures table are used inn the selected report

Exploring Semantic Link Labs

I’m just getting into Semantic Link Labs, and I’m really enjoying the report package. I’m sure you’ll see more from me about this library as it is a great wrapper for easy access to Power BI APIs and a good way to automate the tasks of getting metadata and making updates in Power BI reports. If you are using Semantic Link Labs, I’d love to know what you are doing with it.

The post Finding fields used in a Power BI report in PBIR format with Semantic Link Labs first appeared on Data Savvy.

November 27, 2024/by Meagan Longoria
Tags: Microsoft Fabric, Semantic Link Labs
Share this entry
  • Share on Facebook
  • Share on X
  • Share on X
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
/wp-content/uploads/2024/05/Data-Architecture-as-a-Service-with-ProcureSQL.png 0 0 Meagan Longoria /wp-content/uploads/2024/05/Data-Architecture-as-a-Service-with-ProcureSQL.png Meagan Longoria2024-11-27 21:12:352026-02-05 17:15:51Semantic Link Labs with Power BI: Finding fields used in a Power BI report in PBIR format
You might also like
Fabric Lakehouse Schemas: Your Data’s New Best Friend
Microsoft Fabric Mirroring changes the game with Data Ingestion giving you near real-time data with a no-code framework Fabric Mirroring is Changing the Game for Data Ingestion
Meagan Longoria Semantic Link Labs: A Key-player in Power BI Automation
Join Our Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,21,false,1,First Name,21,false,1,Last Name,2
Search Search

Blog Categories

  • $150 Challenge
  • Advice
  • Announcements
  • Artificial Intelligence
  • Awards
  • Azure Data Factory
  • C-Level
  • Cloud
  • Community
  • Conferences
  • Data Architecture
  • Data Integration
  • Data Intergration
  • Data Visualization
  • Data Warehousing
  • DBA 101
  • Design
  • Disaster Recovery or High Availability
  • Education
  • Fabric Dev Ops
  • Fabric Lakehouse
  • Fabric Lakehouses
  • Fabric Mirroring
  • Fabric Notebooks
  • Features
  • General
  • Health Checks
  • Lab
  • Microsoft Fabric
  • Microsoft Technologies
  • Newsletter
  • Performance Tuning
  • Power BI
  • ProcureSQL
  • Python
  • Reporting
  • Security
  • SQL Server
  • SQL Server
  • sql server 101
  • SQLServerPedia Syndication
  • syndication
  • The Blog
  • Uncategorized
  • Visual Studio Credit

Tags

#SQLFamily automatic tuning availability group azure backup Backups career Data Governance Data Loss Data Platform DBA Denver Differential Backup Disaster Recovery Fabric Fabric Architecture Full Backup High Availability Houston Marketing Database Administrator Microsoft Microsoft Fabric Microsoft SQL Server mirroring parameter sniffing PASS performance tuning Professional Development query store Recovery Recovery Model Restores Security SQL Saturday SQL Server SQL Server 2017 sql server 2019 SQL Server 2022 sql server 2025 SSMS System Databases Transaction Log Backup tsqltuesday Tuning Wait Stats

Archives

  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • November 2025
  • October 2025
  • September 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • February 2024
  • January 2024
  • November 2023
  • October 2023
  • March 2023
  • January 2023
  • May 2022
  • April 2022
  • November 2021
  • September 2020
  • August 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • July 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • December 2016
  • November 2016
  • October 2016
  • July 2016
© Copyright 2026 - ProcureSQL - 1464 East Whitestone Blvd., Suite 1902 Cedar Park, TX 78613, USA
  • Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Link to: AI in the Boardroom: Turning Data into Strategic Insights Link to: AI in the Boardroom: Turning Data into Strategic Insights AI in the Boardroom: Turning Data into Strategic Insights Link to: Ignite 2024 Cliff Notes Link to: Ignite 2024 Cliff Notes Ignite 2024 Cliff Notes
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}