cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
selimovd
Level: Power Up

Don't understand it - Invalid Formula. Expected a value compatible with 'DataSource'

Hello everyone,

 

I try to do a demo to write back to the SQL Server source with PowerApp in a Power BI Report. Actually it's exactly like in this example:
https://www.youtube.com/watch?v=LxuRzj0X348

 

I try to do it with AdventureWorksDW2017 and the table FactSalesQuota. In Power BI I pass through the following fields from the table FactSalesQuota:

PowerApp1.png

 

In PowerApp I did a gallery (shows the Power BI values) and added an edit field (connected to the SQL Server datasource FactSalesQuota). There I tried to make a connection to the gallery by putting as item myGallery.Selected

 

PowerApp2.png

 

But I always get the error message "Invalid Formula. Expected a value compatible with 'DataSource'". Yes, I searched the forum and I didn't understand it at all.

 

How do I pass the right fields to the PowerApp that it can display the selected values? I appreciate any help

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Level 10

Re: Don't understand it - Invalid Formula. Expected a value compatible with 'DataSource'

Hi @selimovd ,

 

I have made a test on my side, and also have the same issue.

The cause of issue is that date column is divided into Day, Month, Quarter, Year columns. However the Original SQL Data source is still data column. So the error show the items isn’t compatible with 'DataSource'.

 

Annotation 2019-09-02 150244.png

The work around is changing “Date Hierarchy (Defaults)” to “date” by right-clicking when you select Fields to PowerApps Data, so that the date column will not be divided.

Then just keep the previous step, it will work fine.

Annotation 2019-09-02 151633.png    Annotation 2019-09-02 151103.png

Best regards,

Sik

View solution in original post

1 REPLY 1
v-siky-msft
Level 10

Re: Don't understand it - Invalid Formula. Expected a value compatible with 'DataSource'

Hi @selimovd ,

 

I have made a test on my side, and also have the same issue.

The cause of issue is that date column is divided into Day, Month, Quarter, Year columns. However the Original SQL Data source is still data column. So the error show the items isn’t compatible with 'DataSource'.

 

Annotation 2019-09-02 150244.png

The work around is changing “Date Hierarchy (Defaults)” to “date” by right-clicking when you select Fields to PowerApps Data, so that the date column will not be divided.

Then just keep the previous step, it will work fine.

Annotation 2019-09-02 151633.png    Annotation 2019-09-02 151103.png

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,900)