cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Community Support
Community Support

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
Community Support
Community Support

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (21,340)