![](/img/trans.png)
[英]in “Crm dynamics 365 on premise” how to integrate the vignettes “Power bi” in dashboard?
[英]How do you search the Dynamics 365 database for Power BI
我在使用 Power BI 的 Dynamics 365 數據庫中查找內容時遇到問題,當您連接到 OrganizationData.svc 時,有很多表和子表。
例如,我正在使用表“OpportunitySet”,有人添加了一個自定義組合框,我能夠獲得值“176000004”,但我找不到從中獲取文本值的方法。
我在“PickListMappingSet”中搜索,但是東西太多了。
此外,我所有的機會都有一個團隊和這些團隊中的人員,我認為它們與“連接”有關,但我不知道如何在 Power BI 中獲取它們,我需要他們找到一些團隊中缺少人員的機會.
有什么辦法可以在數據庫中到處搜索,或者找到每個值存儲在其中的位置。
謝謝
基本上對於內部部署,您可以從 StringMap 實體中提取並查看數據庫中的所有選項集(=picklist=combobox)值。 對於在線,這是一個問題。
這是 PowerBI 查詢和 oData 端點的一個已知問題,您無法獲取自定義或用戶創建的選項列表值。
您可以要求一些 CRM 開發人員從 CRM 自定義中獲取所有選項列表值/文本並將其作為源存儲在 PowerBI 數據集中,以便在與主數據集合並后獲得所需的結果。
編輯:Xrmtoolbox PowerBI 選項集助手會很有幫助。
stringmaps
未在 api 的元數據中列為實體。 但是https://<your_dynamics_url>/api/data/v9.1/stringmaps
在 Chrome 中對我https://<your_dynamics_url>/api/data/v9.1/stringmaps
,盡管您收到分頁響應,這意味着您可以構建參考查詢以在查找選項集甚至狀態和狀態代碼時使用:
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"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.