Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors