Forum Discussion
OLE DB or OCBC Error in a calculated column
- 5 months ago
Hi mike_asplin
Thanks for the update!
This is expected in composite models (Power BI semantic model). RELATEDTABLE() can break after refresh due to relationship limitations, which leads to the Missing_References / OLE DB error.
TREATAS() works more reliably since it doesn’t depend on relationships, so it’s best to use that approach here. Also, importing directly from another semantic model isn’t supported, you’d need to use the underlying source or Dataflows if required.
Hope this helps!
Hi mike_asplin
I wanted to check if you had a chance to review the earlier questions and share the sample data.
Additionally were you able to test the behavior using the existing reports as discussed? Any observations would help us narrow this down further.
I went back and tried this code again and this time it seems happy
Count Booking Starts = CALCULATE(COUNTROWS(Client_Bookings),
TREATAS(VALUES(Client[Account Number Booking]),Client_Bookings[Account Number]))
So basically use TREATAS when linking to tables form external models instead of creating relationships.
Thanks for clarifying