# PowerBI and UD Fields

**URL:** <https://www.epiusers.help/t/powerbi-and-ud-fields/50423>\
**Category:** Epicor ERP 10\
**Tags:** powerbi-ud-feilds\
**Created:** [December 7, 2018, 12:13am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423 "2018-12-07T00:13:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [December 7, 2018, 12:13am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/1 "2018-12-07T00:13:12Z")

</div>

We are trying to use PowerBi and usually we can create the query in EPICOR BAQ and copy paste the syntax into the Power Query. We have some UD fields that were created on the OrderRel table, and it is giving us some errors.

Details: “Microsoft SQL: The multi-part identifier “OrderRel\_UD.CustReqDate\_c” could not be bound.  
Invalid column name ‘CustReqDate\_c’.  
Invalid column name ‘CustReqDate\_c’.  
Invalid column name ‘PromiseDate\_c’.”

I thought if we put the \_UD in front of the table that would help, now we get a different error.

Details: “Microsoft SQL: The multi-part identifier “OrderRel\_UD.CustReqDate\_c” could not be bound.  
The multi-part identifier “OrderRel\_UD.CustReqDate\_c” could not be bound.  
The multi-part identifier “OrderRel\_UD.CustReqDate\_c” could not be bound.  
The multi-part identifier “OrderRel\_UD.PromiseDate\_c” could not be bound.”

Anyone have this issue or might have a solution.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [December 7, 2018, 12:27am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/2 "2018-12-07T00:27:26Z")

</div>

The UD fields on E10 are actually separate tables in the database. When using Epicor, it automatically pulls this table and links it. Outside of Epicor you will have to make the link yourself. I haven’t had to do that yet, I just know that’s how it works. You will have modify your SQL to join to that table.

---

<div class="post-metadata">

**Author:** ![bmanners](https://www.epiusers.help/user_avatar/www.epiusers.help/bmanners/32/370_2.png) [@bmanners](https://www.epiusers.help/u/bmanners)\
**Post date:** [December 7, 2018, 1:08am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/3 "2018-12-07T01:08:06Z")

</div>

If you query dbo schema instead of ERP you may find the tables have been joined for you in a view. Eg select \* from dbo.OrderRel.

Brett

---

<div class="post-metadata">

**Author:** ![PaulMorgan](https://www.epiusers.help/letter_avatar_proxy/v4/letter/p/e9c0ed/32.png) [@PaulMorgan](https://www.epiusers.help/u/PaulMorgan)\
**Post date:** [December 7, 2018, 3:47am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/4 "2018-12-07T03:47:59Z")

</div>

Join OrderRel and OrderRel\_UD (OrderRel.SysRowID = OrderRel\_UD.ForeignSysRowID)

---

<div class="post-metadata">

**Author:** ![danbedwards](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@danbedwards](https://www.epiusers.help/u/danbedwards)\
**Post date:** [December 7, 2018, 4:21am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/5 "2018-12-07T04:21:46Z")

</div>

Just curious - why are you not using REST to retrieve the data from Epicor to PowerBI?

---

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [December 7, 2018, 2:45pm UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/6 "2018-12-07T14:45:09Z")

</div>

I heard about REST and recently saw some EPICOR info on this. So in short, I have no knowledge of REST, just that it is some sort of API. Plus, I dont know anything about API’s. +:slight\_smile:

---

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [December 7, 2018, 2:47pm UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/7 "2018-12-07T14:47:12Z")

</div>

Thank you all for the info. I, we, didnt think about linking the two tables.

---

<div class="post-metadata">

**Author:** ![danbedwards](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@danbedwards](https://www.epiusers.help/u/danbedwards)\
**Post date:** [December 8, 2018, 1:39am UTC](https://www.epiusers.help/t/powerbi-and-ud-fields/50423/9 "2018-12-08T01:39:42Z")

</div>

If you do use direct SQL there are views created that do this join for you. The tables used by the application are in the erp and ice schema but the views are in the dbo schema. So to get the equivalent of joining erp.orderhed to erp.orderhed\_ud you can use dbo.OrderHed (view)  
 ![image](https://epiusers.help/uploads/default/original/2X/0/047c684b1215fbd2f993bf67e0f453f5863cc868.png)
