Custom map (JSON) won't display on Power BI dashboard - powerbi

This is a power BI Desktop query.
I've been trying to add a custom map in shape map.
The custom map I'm trying to use is the world-countries-san-anartica.json found here: https://github.com/deldersveld/topojson
And the dataset am working on is the Sovereign states and dependencies by population table in https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population
When I click Format -> Shape -> Add Map and upload the custom map, I still see the USA: states (default) map in my dashboard and not the custom map.
How would I fix this?
Thanks!

Related

Read visual properties (chart type, position, size, etc) of PowerBI dashboard

I have a online Powerbi dashboard. I want to create a cvs which contains a visual summary of all the objects in my dashboard.
This is what the export will look like (see below). As you can see it simply describes all the objects - their names, position, size, what page they are on etc.
How can I achieve this? I'm guessing there isn't built in way to do this? I will have to use custom code?
In Report component we can use activePage.getVisuals() to get list of all the the visuals and its properties.
But we don't have such method for Dashboard component, although you can use Get Tiles In Group API to get details of tiles like: id, title, embedUrl, rowSpan, colSpan, reportId, datasetId.
Reference:
Dashboards - Get Tiles In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Power BI Column Mapping does not show the values

I am a newbie to Power BI, I am trying to learn how to create a workflow. As a first step, I created an ADLS Gen2 container and uploaded a sample json to the container. Json has only one key/value. Something like
{ "DOMINO_API_KEY": "val1"}
I am able to establish the connection to my container through Power BI, transform the JSON to a table like in the below screenshot
Then I clicked next to create the Map table. It shows me to enter the table name etc
When I created the table, I do not see the value in the table which I transformed earlier. What am I doing wrong here, can anyone help?
Thanks,
Tintu

How to create a filter in powerbi that will dynamically query the db using a SP with a parameter

I am trying to run a direct query on my DB and apply a filter input by the user. The user input would be used as a parameter for my Stored Procedure that retrieves the data I want to display to the user. The reason for running a direct query and not just refreshing the data and then the user filtering from all of that data, is that the database is really large and it would make the report file approx. 650mb in size. My idea is that with a direct query, I can pull only the data required through an indexed column that the Stored Procedure uses to filter.
Currently I was able to create a parameter in the Query editor and use it in a query function but this creates an "Invoked Function" table. If I use these results in my report essentially the user can only filter through the result I filtered in my query editor. I want the user to be the one to input that value and the report to dynamically load it.
As far as the filter field, I am using a slicer and added the search capability to it so they can type out the search value and select the result in the list. Ideally I would like a textbox that they can type the value they want and search for it.
Is this possible in PowerBI? and if so how could I accomplish this?
You have to download a separate application called Power BI Report Builder to accomplish this and create a paginated report. See Url below:
Paginated Reports

Any tool available to replace an existing Table and apply all steps

Let's say I have a View "A" imported in powerbi as table
Very few columns is being used in the visuals from the powerbi, so in order to reduce the refresh time and sql server load I have created a new view "B" specifically for that report
Inorder to replace A with B, now I have to do everything manually, from changing Datatype in powerbi side, changing fields in visuals
Since I have retained the same name of the columns in the new view B, Is there is any tool to achieve the above in simple manner?

Work with Power BI Matrix taking data from DAX statement

I have the following requirements:
The user will see a Power BI Matrix on a web page (as opposed to Power BI Desktop).
The web page should have three elements: a text field, a button and the Power BI Matrix (potentially included in a Power BI Report).
The user will enter the DAX statement in the text field and click on the button to direct the Matrix to take the DAX statement, execute it, and populate the data.
The user should be able to drill down in the Matrix.
The user may reenter a new DAX statement, refreshing the Matrix.
Now, all the documentation I could find, for example here, talk about the Matrix in Power BI Desktop (i.e. not web page) and the data taken by selecting manually tables/columns/measures (on the right side of the screen).
In Power BI Studio, I know that I can enter a DAX statement by creating a table in the top bar, for example if I have the DAX:
EVALUATE TOPN (3, branches)
I could create a table to populate the Matrix with:
BranchesTable = TOPN (3, branches)
But how to dynamically link a DAX statment defined at run-time to a Matrix on a web page?
This is not currently possible to do exactly what you want. You can dynamically change a data source and update the query used in a specific report but there isn't an API available (PowerBI REST or PowerBI JavaScript) to update what columns are on a visual in a report. You can get pretty close to what you want but the report cannot be displayed in View mode and it will have to be displayed in Edit mode so the user will have the ability to drag the fields generated from their updated DAX query results onto the Matrix visual manually if they submit a change.
Assuming you already have the pre-requisite App Registration setup and configuration completed and your ready to embed here are some steps to get close to what your looking for. If your not ready to embed there is some documentation below the 8 steps I provided to complete the pre-requisite setup to be able to embed.
Using PowerBI Desktop Create a template report that has a matrix visual and a connection to the data source you want to use. Be sure to set this report up using a specific query and NOT all tables in the data source whether its SQL or SSAS. (You specify the query under advanced options when you initially setup the data source in the report)
Setup a Power BI Data Gateway to the Data Source your report uses
Create a workspace on PowerBI.com to upload the report to
Using PowerBI desktop Publish the report you created in step 1 to the workspace you created in step 3
On your Web Application, when a user views the report viewer page, you need a way to identify each user. Lets assume you have UserId field that is a unique ID for each user. Call GetReports in group https://learn.microsoft.com/en-us/rest/api/power-bi/reports/getreportsingroup. You need to have a known report name plus the UserId. Lets assume its DynamicReport. So call GetReports and check if DynamicReport_UserId exists for the user trying to view the report viewer page in your web application.
In that API calls result from step 5, if the report does not exist for a user, use https://learn.microsoft.com/en-us/rest/api/power-bi/reports/clonereport to clone the template report you published in step 4.
Embed and display user specific template report (DynamicReport_UserId) for the user.
Have logic on the report viewer page so the user can submit and POST a DAX query. When they do a submit have logic to use https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources on the back end to update the data source in their report and then embed the report again with their DAX statement and changed data.
The visual isn't going to automatically update to the new fields from the new query that is submitted by the user but the available data fields they have in editor mode will change. The user will have to drag and drop the fields from their DAX query onto the Matrix visual or whatever visual type they are going to chose to use. You won't be able to just display a report in View mode since you don't have a way to programatically update what fields are on visual. The user may even end up seeing a broken visual initially because of the changed query and the visual referencing fields from the previously used query. You could use PowerBI Javascript API to hide the existing visual to improve the user experience of the user not seeing something broken.
Let me know if you have any specific questions about these API calls or how to use them.
Here is where I've been looking for the Power BI JavaScript functionality https://github.com/Microsoft/powerbi-javascript/wiki (Can't find anything specific to matrix Visuals. The JavaScript functionality for visuals generic to Visuals and not Visual Type like Matrix or Card)
Here is Microsoft's documentation on the available REST APIs and https://learn.microsoft.com/en-us/rest/api/power-bi/
Here are some good resources to learn more about embedding
https://learn.microsoft.com/en-us/power-bi/developer/embedded/register-app
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedding
If you need drill down capability Hierarchies are a great option
https://spreadsheeto.com/power-bi-hierarchy/