Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Table and column name retrieval for Power BI

Posted on by 10

Hello,

I hardly have any experience with Dynamics CRM. For a data model in Power Bi i am in need of a table i which hosts a field which can be seen in the front end.
I would like to link it to the opportunities table. 

On the backend i am not able to find it. 

Does anybody know the best way to retrieve the table and column involved?

Any help is appreciated. 

Kind regards,
JeroenScreenshot-2021_2D00_05_2D00_19-160119.png

  • meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Table and column name retrieval for Power BI

    Glad you managed to solve your problem. With pleasure, do not hesitate to come back on the forum for other questions.

  • JeroenHD Profile Picture
    JeroenHD 10 on at
    RE: Table and column name retrieval for Power BI

    That did the trick indeed! Thanks a heap Mehdi! You are a lifesaver!

  • Verified answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Table and column name retrieval for Power BI

    Hi,

    I guess I figured out the trick. In fact you have to select also the join columns by using an expand in your odata query. 

  • JeroenHD Profile Picture
    JeroenHD 10 on at
    RE: Table and column name retrieval for Power BI

    This might sound strange, but the only columns i see with 'Customer' in it are the ones on the image.

    Customerid_value returns id string. 
    Customerid_account returns an exandable column in Power BI which returns the same error as described in the previous post.


    Screenshot-2021_2D00_05_2D00_20-163912.png

    Kind regards,
    Jeroen

  • meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Table and column name retrieval for Power BI

    Hi Jeroen,

    You are welcome partner. Please try with "customerid" columun.

  • JeroenHD Profile Picture
    JeroenHD 10 on at
    RE: Table and column name retrieval for Power BI

    Hi Mehdi,

    thanks for your swift replies. I would love to check if i can get it, but in this case i don't know what column to refer too? Which one should i have here?

    Kind regards,

    Jeroen

  • meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Table and column name retrieval for Power BI

    Hi Jeroen,

    I'm sorry, I'm not a Power BI expert. I'm afraid I can't help. Could you please test the same thing with the "Account2" column?

    pastedimage1621513985628v1.png

  • JeroenHD Profile Picture
    JeroenHD 10 on at
    RE: Table and column name retrieval for Power BI

    Hello Mehdi, 

    Thanks again. In Power Query it allowed me to add an expandable column named pdw_SalesRep. Only thing is now when i try to unlock these items it returns an error. Do you have any suggestions what might be the case or should i check with the Power Bi Community?

    Thanks for helping me locating the column!

    DataFormat.Error: We expected a property 'pdw_salesrep', but the OData service omitted it from the response data. This can occur for a number of reasons and does not necessarily imply that the data does not exist or is of a default value.
    Details:
    Property=pdw_salesrep

    Screenshot-2021_2D00_05_2D00_20-130753.png

    Kind regards,
    Jeroen

  • Verified answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Table and column name retrieval for Power BI

    Hi,

    Yes, you are right. You are looking for the pdw_SalesRep Column. Please don't forget to verify my answer by ticking YES. It will help others to find the right answer.

  • JeroenHD Profile Picture
    JeroenHD 10 on at
    RE: Table and column name retrieval for Power BI

    Hello  Mehdi,

    Thanks for your reply and the solution provided. I think the below highlighted in red is what i'm after? 

    SelectStart*/select \"opportunity0\".[Name] as \"name\"\r , \"opportunity0\".[TransactionCurrencyId!id] as \"transactioncurrencyid!id\"\r ,

    \"opportunity0\".[TransactionCurrencyId!logicalname] as \"transactioncurrencyid!logicalname\"\r , \"opportunity0\".[TransactionCurrencyId!name] as

    \"transactioncurrencyid!name\"\r , \"opportunity0\".[EstimatedValue] as \"estimatedvalue\"\r , \"opportunity0\".[EstimatedCloseDate] as \"estimatedclosedate\"\r ,

    \"opportunity0\".[CustomerId!id] as \"customerid!id\"\r , \"opportunity0\".[CustomerId!logicalname] as \"customerid!logicalname\"\r , \"opportunity0\".[CustomerId!name] as

    \"customerid!name\"\r , \"opportunity0\".[CloseProbability] as \"closeprobability\"\r , \"opportunity0\".[OpportunityRatingCode] as \"opportunityratingcode\"\r ,

    \"opportunity0\".[pdw_OpportunityNumber] as \"pdw_opportunitynumber\"\r , \"opportunity0\".[pdw_ActualQuoteDate] as \"pdw_actualquotedate\"\r , \"opportunity0\".[qpw_machinetype!id] as

    \"qpw_machinetype!id\"\r , \"opportunity0\".[qpw_machinetype!logicalname] as \"qpw_machinetype!logicalname\"\r , \"opportunity0\".[qpw_machinetype!name] as \"qpw_machinetype!name\"\r ,

    \"opportunity0\".[pdw_ProgressStage] as \"pdw_progressstage\"\r , \"opportunity0\".[pdw_ProjectProbability_optionset] as \"pdw_projectprobability_optionset\"\r ,

    \"opportunity0\".[qpw_Probability_optionset] as \"qpw_probability_optionset\"\r , \"opportunity0\".[pdw_GrossMargin] as \"pdw_grossmargin\"\r , \"opportunity0\".[new_Products_Quantity] as

    \"new_products_quantity\"\r , \"opportunity0\".[pdw_SalesRep!id] as \"pdw_salesrep!id\"\r , \"opportunity0\".[pdw_SalesRep!logicalname] as \"pdw_salesrep!logicalname\"\r ,

    \"opportunity0\".[pdw_SalesRep!name] as \"pdw_salesrep!name\"\r , \"opportunity0\".[StepName] as \"stepname\"\r , \"opportunity0\".[OpportunityId] as \"opportunityid\"\r ,

    \"opportunitycustomeridcontactcontactid\".[EMailAddress1] as \"opportunitycustomeridcontactcontactid.emailaddress1\"/*SelectEnd*/ /*FromStart*/from Opportunity as

    \"opportunity0\" \t/*JoinStart*/ left outer join Contact as \"opportunitycustomeridcontactcontactid\" on (\"opportunity0\".[customerid!id] =

    \"opportunitycustomeridcontactcontactid\".[ContactId])/*JoinEnd*//*FromEnd*/ /*WhereStart*/where (\"opportunity0\".[StateCode] = 0 and (\"opportunity0\".[ownerid!id] =

    \"!eq-userid!\" or \"opportunity0\".[pdw_accountmanager!id] = \"!eq-userid!\" or \"opportunity0\".[pdw_areasalesmanager!id] = \"!eq-userid!\" or \"opportunity0\".[new_salesengineer!id] =

    \"!eq-userid!\"))/*WhereEnd*/ /*OrderByStart*/order by \"opportunity0\".[EstimatedCloseDate] asc/*OrderByEnd*/","columnsetxml":null,"organizationtaborder":null,"_modifiedonbehalfby_value":null,

    "queryappusage":null,"advancedgroupby":null,"conditionalformatting":null,"description":null,"iscustomizable":{"Value":true,"CanBeChanged":true,"ManagedPropertyLogicalName":"iscustomizableanddeletable"},

    "canbedeleted":{"Value":false,"CanBeChanged":true,"ManagedPropertyLogicalName":"canbedeleted"}}]}

    Kind regards,
    Jeroen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans