简体   繁体   中英

How do you search the Dynamics 365 database for Power BI

I'm having trouble finding things in the database of Dynamics 365 with Power BI, when you connect to the OrganizationData.svc, there is a LOT of table, and sub table.

For exemple, I'm working with the table "OpportunitySet", someone add a custom combobox, I'm able to get the value "176000004", but I can't find a way to get the text value from this.

I search in the "PickListMappingSet", but there is too much stuff.

Also, all my Opportunities have a Team and people in those teams, I think they are link with "Connections", but I have no idea how to obtain them in Power BI, I need they find some opportunities who have missing people in their team.

Is there any way to search everywhere in the DataBase, or to find where each value is store in it.

Thanks

Basically for onpremise, you can pull from StringMap entity & see all the optionset (=picklist=combobox) values in Database. For online it's a problem.

This is a known issue with PowerBI query as well as oData endpoint, you cannot get the custom or user created picklist values.

You can ask some CRM developers to get all the picklist values/text from CRM customizations & store as a Source in PowerBI datasets to get the desired results after merge with main dataset.

Edit: Xrmtoolbox PowerBI optionset assistant will be helpful.

stringmaps is not listed as an entity in the metadata for the api. However https://<your_dynamics_url>/api/data/v9.1/stringmaps works in Chrome for me although you receive a paginated response, which means you can build a reference query to use when looking up optionsets or even state and status codes:

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM