Hello, I am trying to reverse the data order to show the largest amount on the left-hand side and the smallest on the right. I have tried resorting my data but that does not seem to work. I am also trying to set the scale by 10% but also cannot get that. Any help would be appreciated, thank you.
100% Stacked Bar Chart - Reverse Data Order
Embedding with Pre Applied Filters: Error Filters Property is Invalid
I have had embedded reports using the PBI Javascript API working for years now. All of a sudden, I am getting an "Uncaught Error" in the browser console saying "Filter property is invalid". I have tried work arounds (like applying filters after report is rendered) but without success.
Enabling Large models in Premium capactiy
Hi all,
I am attempting to enable Large models in my P1 capacity using the following tutorial...
https://docs.microsoft.com/en-us/power-bi/service-premium-large-models
... I am an admin of the workspace and followed the instructions. I am able to execute the Get-PowerBIDataset using my dataset ID and it returns Abf, as expected. When I attempt to execute the Set-PowerBIDataset command, I get a 400 Bad Request error. I added the -debug parameter. Please see the log below...
Set-PowerBIDataset : Operation returned an invalid status code 'BadRequest'
At line:1 char:1
+ Set-PowerBIDataset -Id 9b463f9a-9831-4aaf-9c6d-a01ef261cd35 -Workspac ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...tPowerBIDataset:SetPowerBIDataset) [Set-PowerBIDataset],
HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'BadRequest',Microsoft.PowerBI.Commands.Data.S
etPowerBIDataset
VERBOSE: Request Uri:
https://api.powerbi.com/v1.0/myorg/groups/e6c92ab3-6db8-4e0b-8b98-e083a60d1994/datasets/9b463f9a-9831-4aaf-9c6d-a01ef26
1cd35
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y
VERBOSE: Status Code: BadRequest (400)
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y
DEBUG: 5:07:57 PM - Set-PowerBIDataset end processing.
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y
PS H:\> Set-PowerBIDataset -Id 9b463f9a-9831-4aaf-9c6d-a01ef261cd35 -TargetStorageMode PremiumFiles
Set-PowerBIDataset : Operation returned an invalid status code 'BadRequest'
At line:1 char:1
+ Set-PowerBIDataset -Id 9b463f9a-9831-4aaf-9c6d-a01ef261cd35 -TargetSt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...tPowerBIDataset:SetPowerBIDataset) [Set-PowerBIDataset],
HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'BadRequest',Microsoft.PowerBI.Commands.Data.S
etPowerBIDataset
... any ideas?
PowerBI and PowerApps
I have a PowerBI Report and an embedded PowerApp App.
The PowerBI report has a table with about 900+ rows in it. The intent was when one row in the PowerBI Table has been selected, then that record would appear in the embedded PowerApps App, so the data could be modified in PowerApps, and a button clicked.
I watched this video:
https://www.youtube.com/watch?v=LxKLLgUhlBo
My button executes an MS Flow routine, which calls a stored procedure, and then sends a PowerBIIntegration.Refresh() command.
This was working rather nicely last week, and then something changed. No data appears in the PowerApp text boxes any longer.
It seems that when no rows are selected in the table, all of that data is sent over as a collection to PowerApps. But when a single row was selected in the PowerBI Table, no data is sent over to PowerApps.
My text boxes have something similar to the following in the Default property: First(PowerBIIntegration.Data).ObjectName
What is the appropriate syntax to use in a PowerApps App to display only the PowerBI highlighted row in PowerApps ? Perhaps I need to change the syntax in PowerApps. But this was working last week....and now it's not...
Thank you.
Re: Dataflow refresh status - API
I'm looking for exactly the same info. In our case, we have multiple "ingest" dataflows that go into a compute dataflow. I want to know when all the ingest dataflows are complete so I can kick off the compute dataflow.
I'm able to see the refresh status in a browser...seems like there should be an API, just like the one for datasets. But I wasn't able to get one to work.
Thanks,
Scott
Re: REST import rdl files
The problem with your code is the value of the nameConflict parameter:
$url = "https://api.powerbi.com/v1.0/myorg/groups/$GroupId/imports?datasetDisplayName=$fileName&nameConflict=CreateOrOverwrite"
For RDL files, the only supported values are Abort or Overwrite.
There is, however, a bug in that we are not returning a helpful error message. We are looking in to fixing this in a future release.
Thanks,
Teresa (MSFT)
Correct Python variables calls
Hi,
I am trying to build a proportion table of late vendors based off orders. I built this basic code back in october through Jupyter Notebook and it still works fine there. I am trying to implement it on power bi now and I am confused whether it is necessary to declare the variable I am using, even though I have selected the column in Power BI. I get a name error as follows: LateDays is not defined. LateDays is the field that I get on power bi by using Odata, a service my company uses to fetch live data.
this is the code:
Power BI Embedded App Owns Data and Azure AD
I have embedded Power Bi into a react.js application and have generated the embeddded token which expires after a certain point (maybe an hour).
I've read that the token generation should be completed on the server side and it also appears that Azure AD is required.
Azure AD can get expensive, I wanted to check to see if this is essential to embed Power BI in an App Owns Data scenario or if there are other options to securley generate the token and embed Power BI?
Re: Enabling Large models in Premium capactiy
To add to this, I ran Resolve-PowerBIError...
RequestId : f8ec7aeb-7350-4798-9f70-d81cbe09d459
Response : Bad Request (400): {"error":{"code":"InvalidRequest","message":"Invalid dataset. Premium Files is
not available for this dataset."}}
PowerBIErrorInfo :
ResponseDate : Wed, 22 Jan 2020 01:36:11 GMT
RequestMethod : PATCH
RequestUri : https://api.powerbi.com/v1.0/myorg/datasets/2d3e0a25-e6d5-4587-b0b4-48e4d8a3820e
InvocationInfo : {Set-PowerBIDataset}
Line : Set-PowerBIDataset -Id 2d3e0a25-e6d5-4587-b0b4-48e4d8a3820e -TargetStorageMode PremiumFiles
Position : At line:1 char:1
+ Set-PowerBIDataset -Id 2d3e0a25-e6d5-4587-b0b4-48e4d8a3820e -TargetSt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.PowerBI.Api.V2.Datasets.<UpdateDatasetByIdWithHttpMessagesAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V2.DatasetsExtensions.<UpdateDatasetByIdAsync>d__81.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V2.DatasetsExtensions.UpdateDatasetById(IDatasets operations, String
datasetKey, UpdateDatasetRequest updateDatasetRequest)
at Microsoft.PowerBI.Common.Api.Datasets.DatasetsClient.PatchDataset(Guid datasetId,
PatchDatasetRequest patchDatasetRequest, Nullable`1 workspaceId)
at Microsoft.PowerBI.Commands.Data.SetPowerBIDataset.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
HistoryId : 18
... which gave me more insight on the 400 error... "Invalid dataset. Premium Files is
not available for this dataset."
I am wondering what is missing in the *.pbix file? I have premium capacity set on my workspace and incremental refresh enabled with the right parameters. I have confirmed incremental refresh is working with a smaller amount of data.
Re: Dataflow refresh status - API
There is not an API endpoint for this. The only way I've found is to extract the dataflow .JSON and check /entites/[]/partions/[]/refreshTime.
If your entity is using Incremental Refresh, this refreshTime is always one refresh behind.
Re: Correct Python variables calls
Hi,
It seems on my Power BI desktop, Python Visual fetches the data and saves it as the variable "dataset".
Try to replace "df" by "dataset" in your script.
Hope it will solve your problem.
Thanks,
Ty
How to pass parameters to the SQL statement from the embedded app?
Hi,
I'm new to the PBI services so my question might be a bit silly but I'm a bit lost.
TLDR
Is it possible to pass parameter to the SQL query from the app over the PBI API to display the report? What would be the best way to do that?
Current stack
- In the PBI Desktop we have reports and the SQL queries are sitting there.
- The published reports are in the PBI services in a Workspace.
- We have a single page application with it's own login and role system where we'd like to display the reports.
- We also have an API (in Azure Funtions) what get's all the embedTokens and embedLinks for the reports in a specific group from the PBI services.
- Until this point everything works fine however the report contains everybody's data.
- So I'm wondering would it be possible to pass a param to the SQL query from the app to update the report?
Goal
When the user logs in the app knows the group ID he belongs to. The displayed report should be based on that specific ID and the user should not be able to see any other results.
I imagined something like:
- Somehow passing params to the PBI API:
https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}?myId=123
- The report runs the SQL query with the passed param and the embedded report would update.
This might be not the best approach but how could we achieve that? Is it even possible to dynamically update the SQL query from the app/API?
if not, how could I display the data based on the user's role?
Thank you in advance,
Regards
David
How & Where to change Power BI password on Mobile Power BI App ( on Apple)
I have changed my windows password, I am trying to open the Power BI app on apple phone. It is looking for the old password and closing down the app. I cannot find a setting where I can update the windows password for the app to work. If I click the option to open the power BI app - Please help me find the spot to update the power BI password on mobile.
Re: Embedding Service principle AppOwnsData 401 ServicePrincipalIsNotAllowedByTenantAdminSwitch
I was able to resolve it by going to Power BI Admin portal (accessible from settings cog on https://app.powerbi.com/home), selecting Tenant Settings, and then toggling the Allow service principals to access Power BI APIs setting to enabled
See the Getting started with service principal section in this article https://powerbi.microsoft.com/en-us/blog/use-power-bi-api-with-service-principal-preview/
Re: PowerBI DirectQuery Performance with Measures
Hi guys,
Use calculated measures in the SQL query, or inside of the native query is better. The performance is faster if you going to use Direct Query, the problem is that possible use only database to do it. I found the link below to differentiate Import and Direct Query to clarify both of them.
https://www.cittabase.com/blog/power-bi-tips-import-vs-direct-query/
Power BI for MAC
Dear Experts,
I would like to know if Power bi has any plans to release desktop version for MAC. If not what is the possible workaround for free. How can we use the applicaiton in MAC without any charges or very low charges.
Regards
Abbas
How to Generate Token for Report with Shared Dataset?
The code snippet below works fine for a Generic Report which means with Internal Dataset, however If I try to GenerateToken for a Report with an External Dataset meaning a Dataset that lives in another Workspace it throws a 403 Forbidden.
Note: I'm using SPN to authenticate my request and SPN is an Admin of Both Workspace (Workspace where the External Dataset Lives and Workspace where the Report lives)
using (var pbiClient = await this.GetClientAsync().ConfigureAwait(false))
{
if (pbiClient != null)
{
var dataset = await pbiClient.Datasets.GetDatasetByIdInGroupAsync(groupId, datasetId).ConfigureAwait(false);
GenerateTokenRequest genereateTokenRequestParameters;
var identity = new EffectiveIdentity(user.Username.Trim(), new List<string> { dataset.Id })
{
Roles = new List<string> { securityRole }
};
genereateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view", identity: identity);
// THIS LINE OF CODE RETURNS 403 FOR REPORT WITH EXTERNAL DATASET,
// WHILE WORKS IF REPORT AND DATASET IS IN THE SAME WORKSPACE
var tokenResponse = await pbiClient.Reports.GenerateTokenInGroupAsync(reportGroupId, report.Id, genereateTokenRequestParameters).ConfigureAwait(false);
embedReport.EmbedToken = tokenResponse ?? throw new NullReferenceException($"Power BI token not generated. Report ID: {report.Id}");
embedReport.EmbedUrl = report.EmbedUrl;
embedReport.ReportId = report.Id;
return embedReport;
}
}
Creating power BI report with customized aggregate measurement
Hi,
Could you please help me to understand the possible option to write custom code while creating power BI report using custom aggregate measurement.
One of the customer is trying to create custom aggregate measurement in F&O for using in power BI report. He is now trying to create a method (which he wants to access in power BI report) and implement few custom logic /call few custom class in it and return a calculated value (e.g. sales totals value for a specific sales order). He tried using computed column of a view to achieve this, but that is becoming complicated as he needs to use sub query for writing the entire logic.
So apart from using a computed column of a view, is there any other option where we can write custom code and return a calculated value and in turn capture it in the aggregate measurement ?
Thanks
Re: Create API Direct Query datasource
I have managed get this works by using the CData Power BI connector for REST.
Re: Embedding with Pre Applied Filters: Error Filters Property is Invalid
Incurring in the same problem. Since few days we're getting the same error on the console.
Anyone has any idea if the power bi API has had any updates/modifications?