我使用Power BI桌面APP创建了一个报告。从桌面应用程序发布报告不会在Azure中将报告发布到PowerBI工作区。
我使用这篇文章从我的Power BI中获取了上载的报告[ https://azure.microsoft.com/zh-cn/documentation/articles/power-bi-embedded-get-started-sample/],但是代码没有不返回任何报告
那让我发疯。
我的主要目标是将POWER BI报表/图块嵌入我的Rails Web App中。
我有一个带有某些报告的POWER BI帐户。我还在Power BI Embedded的Azure门户上创建了Workspace集合。
通过门户,我无法将工作区添加到我的WorkspaceCollection中(为什么要使用M $?)
我正在使用OSX,因此无法遵循这些说明(Visual Studio中为PowerBI-embedded.sln):https ://azure.microsoft.com/zh-cn/documentation/articles/power-bi-embedded-get -started-sample /
因此,作为替代方案,我正在使用OSX Azure CLI:https : //azure.microsoft.com/zh-cn/documentation/articles/xplat-cli-install/
登录后,我可以执行以下操作:
$ azure powerbi -h
help: Commands to manage your Azure Power BI Embedded Workspace Collections
help:
help: Create a new workspace collection
help: powerbi create [options] <resourceGroup> <name> <location> [tags]
help:
help: List workspace collections within subscription or within resource group
help: powerbi list [options] [resourceGroup]
help:
help: Commands to manage …Run Code Online (Sandbox Code Playgroud) azure azure-management-api powerbi azure-cli powerbi-embedded
我有多个列的矩阵可视化说:
项目 ID 项目名称 预算 项目_状态 项目_持续时间
我想首先对 Budget 进行多列排序(就像在 Excel 中一样),然后对 Power BI 中的 Project_duration 进行排序。
sorting columnsorting powerbi powerbi-embedded powerbi-datasource
看起来它应该很简单,但我仍然无法通过参数"Year"获得当月的第一天
因此,如果参数2018年 - 我需要5月1,2018
如果参数2017年 - 需要2017年5月1日
等等
我尝试使用DATE功能,但这一年将是动态的.
如何简单选择一个月的第一天?
谢谢
我正在尝试将 Power BI 报告嵌入到我的 .Net Core 应用程序中,但是我无法从请求中获得有效的响应。我正在使用 Microsoft.PowerBI.API 包和一个向服务主体注册的 azure 应用程序。
据我所知,我已经按照以下说明设置了 AAD 和服务主体,并使用了正确的权限:https : //docs.microsoft.com/en-us/power-bi/developer/embedded/embed-服务负责人
我发现在将该安全组添加到 Power BI 管理门户中的管理设置之前,您必须将 AAD/服务主体添加到安全组的部分。
这是我正在使用的代码片段:
var AuthorityUrl = "https://login.microsoftonline.com/common/";
var ResourceUrl = "https://analysis.windows.net/powerbi/api";
var authenticationContext = new AuthenticationContext(AuthorityUrl);
AuthenticationResult authenticationResult = null;
var credential = new ClientCredential("application_id", "application_secret");
authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, credential);
using (var client = new Microsoft.PowerBI.Api.PowerBIClient(new Uri("https://api.powerbi.com/"), new TokenCredentials(authenticationResult.AccessToken, "Bearer")))
{
var report = await client.Reports.GetReportInGroupAsync(new Guid("workspace_id"), new Guid("report_id"));
}
Run Code Online (Sandbox Code Playgroud)
我成功地从AcquireTokenAsync通话中取回了令牌,但是在收到报告时,我得到了一个未经授权的令牌。
这是我用 Fiddler …
我们目前在数据库中托管多个用户的数据。我想在我们的Web应用程序中实现嵌入式Power BI。当用户登录到我们的系统时,我希望根据登录的用户对数据源进行过滤,因此,例如SELECT * FROM Table1 WHERE ItemID in(ItemID1,ItemID2)等...,我们不是直到用户登录后才知道什么是ItemID1,ItemID2等。
嵌入式PowerBI是否可以实现?
我正在使用 power bi 嵌入式包来嵌入 power bi 报告 - https://github.com/microsoft/powerbi-client-react
报告嵌入在编辑模式中,因此用户可以创建或编辑报告。现在我有一个保存按钮,一旦用户对 power bi 报告进行更改,我想将报告保存在数据库中。你能告诉我如何触发报告事件。看起来允许的保存事件不起作用。
另外,如果我必须在用户进行更改或创建报告后获取报告的实例,我如何再次获取报告的实例以反映新的更改?
<PowerBIEmbed
embedConfig = {{
type: 'report', // Supported types: report, dashboard, tile, visual and qna
id: '<Report Id>',
embedUrl: '<Embed Url>',
accessToken: '<Access Token>',
tokenType: models.TokenType.Embed,
viewMode: models.ViewMode.Edit,
settings: {
panes: {
filters: {
expanded: false,
visible: false
}
},
background: models.BackgroundType.Transparent,
}
}}
eventHandlers = {
new Map([
['loaded', function () {console.log('Report loaded');}],
['rendered', function () {console.log('Report rendered');}],
['error', function (event) {console.log(event.detail);}]
])
}
cssClassName …Run Code Online (Sandbox Code Playgroud) 我完成了本教程中的每个步骤,并获得了所有必需的信息/ID/参数。还看了这些视频。
但是,在运行示例 python 代码(flask 应用程序)并在浏览器中打开 localhost url 的最后阶段,我收到此错误:
Error Details:
401 Unauthorized: Error while retrieving Embed URL
Unauthorized:
RequestId: 0b143776-bc54-492e-80bc-5401ecf32fd3
Run Code Online (Sandbox Code Playgroud)
我不明白为什么
pbiembedservice.py看来我无法获取令牌,并且 401作为 api 响应返回(最后一行):
class PbiEmbedService:
def get_embed_params_for_single_report(self, workspace_id, report_id, additional_dataset_id=None):
'''Get embed params for a report and a workspace
Args:
workspace_id (str): Workspace Id
report_id (str): Report Id
additional_dataset_id (str, optional): Dataset Id different than the one bound to the report. Defaults to None.
Returns:
EmbedConfig: Embed token and Embed …Run Code Online (Sandbox Code Playgroud) 当运行为您的客户应用程序嵌入的示例(Node 和 .NET)时,我收到此错误(在控制台中来自/getEmbedToken)
Status: Unauthorized (401)
Response: {"error":{"code":"PowerBINotAuthorizedException","pbi.error":{"code":"PowerBINotAuthorizedException","parameters":{},"details":[],"exceptionCulprit":1}}}
RequestId: fe5ca8dd-a49e-41b0-8f08-**********
Run Code Online (Sandbox Code Playgroud)
我努力了:
"usage": 0)"isEffectiveIdentityRequired": false)有谁知道还需要检查什么吗?
谢谢!
powerbi-embedded ×10
powerbi ×8
azure ×2
.net ×1
asp.net-core ×1
azure-cli ×1
c# ×1
dax ×1
reactjs ×1
sorting ×1