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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gdecome
Helper III
Helper III

Getting information about the environment (App or Workspace Name)

I have a report published in different Workspaces/Apps and I need to know where I am, when accessing the report, to control the behavior of some visuals. Is it possible to get this kind of information (e.g. using API) so I can use it in DAX?

4 REPLIES 4
Anonymous
Not applicable

I have a similar requirement.  It would be great if the report could automatically switch Datasource depending on which environment the report is in.

amitchandak
Super User
Super User

Thank you for your feedback ... in fact, when the user opens the report (Power BI Services), I need to identify the App or Workspace where the report is coming from (since the same pbix is published in different workspaces). I tested some REST API but I don´t think it is a solution for me because they are getting existing information in the environment, for example, I can get a list of reports in Workspace ABC but I need to inform the Workspace ID. It would work for me if I have an API returning the ID where I am at that moment. Anyway, I will try a simple approach with Parameters in Power Query. I can publish it in different workspaces and then I can change the Parameter (Dataset/Settings in PowerBI Services) and use it for my logic. Just need to remember updating the Parameter when I publish the report again but it is not a big deal.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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