cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thibaug
New Member

Embedded CE (CRM) report changes data type depending on the data

Hi,

We're running into a strange issue while embedding a Power BI report in D365 CE (CRM). We're following the info here. And everything works well except in one case.

We have a string column in CE which has a corresponding column on the Power BI side that is also a string. As long as the content of the column on the CE side is a string, the filter works! But if the column contain a number on the CE side, then it looks like something is converting the value on the fly and Power BI receives a Number. 

So,

Account# - CE (CRM)

Data type

Content

Account# - Power BI

Data type

ContentResult of Filter
String1234aString1234aWorks
String1234String1234Error
String1234Number1234Works

 

Is there something we're missing? Is there a way to specify a data type in the filter XML? 

Thanks in advance!!

Gilles

1 ACCEPTED SOLUTION
thibaug
New Member

Ok, so looks like we've figure it out. Escaping the $a in the filter works. But this appears contradict what Microsoft says in the article. 

Or am I misunderstanding? 

 

  • String fields don't have escaped quotes in the Power BI filter. Below, notice values has [\"$a\"] rather than [$a].

{ "Filter": "[{ \"$schema\":\"basic\", \"target\":{ \"table\":\"My Active Accounts\", \"column\":\"Account Name\" }, \"operator\":\"In\", \"values\":[$a, $b], \"filterType\":1 }]", "Alias": { "$a": "firstname", "$b":"lastname" } }

View solution in original post

1 REPLY 1
thibaug
New Member

Ok, so looks like we've figure it out. Escaping the $a in the filter works. But this appears contradict what Microsoft says in the article. 

Or am I misunderstanding? 

 

  • String fields don't have escaped quotes in the Power BI filter. Below, notice values has [\"$a\"] rather than [$a].

{ "Filter": "[{ \"$schema\":\"basic\", \"target\":{ \"table\":\"My Active Accounts\", \"column\":\"Account Name\" }, \"operator\":\"In\", \"values\":[$a, $b], \"filterType\":1 }]", "Alias": { "$a": "firstname", "$b":"lastname" } }

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.