如何在 Dynamics 365 数据库中搜索 Power BI
How do you search the Dynamics 365 database for Power BI
我在使用 Power BI 的 Dynamics 365 数据库中查找内容时遇到问题,当您连接到 OrganizationData.svc 时,有很多 table 和子 table.
例如,我正在使用 table "OpportunitySet",有人添加了自定义组合框,我可以获得值“176000004”,但我找不到从中获取文本值的方法。
我在"PickListMappingSet"里搜索,可是东西太多了
此外,我所有的机会都有一个团队和这些团队中的人,我认为他们是 link 和 "Connections",但我不知道如何在 Power BI 中获得它们,我需要他们找到了一些机会,他们的团队中缺少人。
有没有办法在数据库中到处搜索,或者找到每个值存储在其中的位置。
谢谢
基本上对于内部部署,您可以从 StringMap 实体中提取并查看数据库中的所有选项集 (=picklist=combobox) 值。对于在线,这是一个问题。
这是 PowerBI 查询和 oData 端点的一个已知问题,您无法获取自定义或用户创建的选项列表值。
您可以要求一些 CRM 开发人员从 CRM 自定义项中获取所有选择列表 values/text 并将其作为源存储在 PowerBI 数据集中,以便在与主数据集合并后获得所需的结果。
编辑:Xrmtoolbox PowerBI 选项集助手会有所帮助。
stringmaps
未在 api 的元数据中列为实体。但是 https://<your_dynamics_url>/api/data/v9.1/stringmaps
对我来说在 Chrome 中有效,尽管您收到了分页响应,这意味着您可以构建一个参考查询以在查找选项集甚至状态和状态代码时使用:
let
DataList = List.Generate(
() => [
SourceURI="https://<your_dynamics_url>/api/data/v9.1/stringmaps"
,Pagecount=0
,Stringmaps = {}
,Source = []
,ErrorTest = try Source = []
]
,each if [ErrorTest][HasError] then false else true
,each [
ErrorTest = try Source = Json.Document(Web.Contents([SourceURI]))
,Source = Json.Document(Web.Contents([SourceURI]))
,SourceURI = Record.Field(Source,"@odata.nextLink")
,Stringmaps = Source[value]
,Pagecount = [Pagecount] + 1
]
),
#"Converted to Table" = Table.FromList(DataList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"Stringmaps"}, {"Column1.Stringmaps"}),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Expanded Column1", {"Column1.Stringmaps"}),
#"Expanded Column1.Stringmaps" = Table.ExpandListColumn(#"Removed Errors", "Column1.Stringmaps"),
#"Removed Blank Rows" = Table.SelectRows(#"Expanded Column1.Stringmaps", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
#"Expanded Column1.Stringmaps1" = Table.ExpandRecordColumn(#"Removed Blank Rows", "Column1.Stringmaps", {"value", "attributename", "objecttypecode", "attributevalue"}, {"value", "attributename", "objecttypecode", "attributevalue"}),
#"Sorted Rows" = Table.Sort(#"Expanded Column1.Stringmaps1",{{"objecttypecode", Order.Ascending},{"attributename", Order.Ascending}}),
#"Grouped Rows" = Table.Group(#"Sorted Rows", {"attributename", "objecttypecode"}, {{"Count", each _, type table [value=text, attributename=text, objecttypecode=text, attributevalue=number]}}),
#"Grouped Rows1" = Table.Group(#"Grouped Rows", {"objecttypecode"}, {{"Count", each _, type table [attributename=text, objecttypecode=text, Count=table]}})
in
#"Grouped Rows1"
我在使用 Power BI 的 Dynamics 365 数据库中查找内容时遇到问题,当您连接到 OrganizationData.svc 时,有很多 table 和子 table.
例如,我正在使用 table "OpportunitySet",有人添加了自定义组合框,我可以获得值“176000004”,但我找不到从中获取文本值的方法。
我在"PickListMappingSet"里搜索,可是东西太多了
此外,我所有的机会都有一个团队和这些团队中的人,我认为他们是 link 和 "Connections",但我不知道如何在 Power BI 中获得它们,我需要他们找到了一些机会,他们的团队中缺少人。
有没有办法在数据库中到处搜索,或者找到每个值存储在其中的位置。
谢谢
基本上对于内部部署,您可以从 StringMap 实体中提取并查看数据库中的所有选项集 (=picklist=combobox) 值。对于在线,这是一个问题。
这是 PowerBI 查询和 oData 端点的一个已知问题,您无法获取自定义或用户创建的选项列表值。
您可以要求一些 CRM 开发人员从 CRM 自定义项中获取所有选择列表 values/text 并将其作为源存储在 PowerBI 数据集中,以便在与主数据集合并后获得所需的结果。
编辑:Xrmtoolbox PowerBI 选项集助手会有所帮助。
stringmaps
未在 api 的元数据中列为实体。但是 https://<your_dynamics_url>/api/data/v9.1/stringmaps
对我来说在 Chrome 中有效,尽管您收到了分页响应,这意味着您可以构建一个参考查询以在查找选项集甚至状态和状态代码时使用:
let
DataList = List.Generate(
() => [
SourceURI="https://<your_dynamics_url>/api/data/v9.1/stringmaps"
,Pagecount=0
,Stringmaps = {}
,Source = []
,ErrorTest = try Source = []
]
,each if [ErrorTest][HasError] then false else true
,each [
ErrorTest = try Source = Json.Document(Web.Contents([SourceURI]))
,Source = Json.Document(Web.Contents([SourceURI]))
,SourceURI = Record.Field(Source,"@odata.nextLink")
,Stringmaps = Source[value]
,Pagecount = [Pagecount] + 1
]
),
#"Converted to Table" = Table.FromList(DataList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"Stringmaps"}, {"Column1.Stringmaps"}),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Expanded Column1", {"Column1.Stringmaps"}),
#"Expanded Column1.Stringmaps" = Table.ExpandListColumn(#"Removed Errors", "Column1.Stringmaps"),
#"Removed Blank Rows" = Table.SelectRows(#"Expanded Column1.Stringmaps", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
#"Expanded Column1.Stringmaps1" = Table.ExpandRecordColumn(#"Removed Blank Rows", "Column1.Stringmaps", {"value", "attributename", "objecttypecode", "attributevalue"}, {"value", "attributename", "objecttypecode", "attributevalue"}),
#"Sorted Rows" = Table.Sort(#"Expanded Column1.Stringmaps1",{{"objecttypecode", Order.Ascending},{"attributename", Order.Ascending}}),
#"Grouped Rows" = Table.Group(#"Sorted Rows", {"attributename", "objecttypecode"}, {{"Count", each _, type table [value=text, attributename=text, objecttypecode=text, attributevalue=number]}}),
#"Grouped Rows1" = Table.Group(#"Grouped Rows", {"objecttypecode"}, {{"Count", each _, type table [attributename=text, objecttypecode=text, Count=table]}})
in
#"Grouped Rows1"