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

PowerApps & Power BI: PowerBIDataIntegration.Data Value in New Form

Hi,

I am trying to develop a PowerApp to embed in Power BI. In the Power BI it is display a user's data.  In the PowerApp I want to have a form to allow users to submit changes they would like to make about their data via creating an item in a SharePoint list and passing the value selected in the Power BI as a value in a field of the SharePoint list.

 

Is there a way to convert the value from the PowerBI Integration from table to text? Below is an example of what I am trying to accomplish:

 

If(Form1.Mode = New,(Patch('Submissions', {ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name)); SubmitForm(Form1); Navigate(Screen3)

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @skwan ,

Firstly, please note that the right syntax of Patch function shoule be:

Patch(tablename,Defaults(tablename),{.....})   //create a new record

Patch(tablename,one item,{....})  //edit an existing record 

 

Secondly,the formula that you use:

{ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name

This can not represent a record. A record shoule be like this: {field1:....,field2:.....,field3:....}

I suggest you try this:

If(Form1.Mode = New,
ClearCollect(test,AddColumns(Form1.Updates,"ID", Blank(),"Name",First([@PowerBIIntegration].Data).Name))
); //create a collection with the data of Form1,ID and Name, use First(table).fieldname could result a value
Collect('Submissions',test); //user this collection to update
Navigate(Screen3)

Here's a doc about Patch, I think maybe you need to know more about it :

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
RezaDorrani
Dual Super User II
Dual Super User II

Hi @skwan 

 

[@PowerBIIntegration].Data always returns a collection 

 

First([@PowerBIIntegration].Data).Name - will give you the first value from Power BI connection

If user selects 1 item in Power BI then First([@PowerBIIntegration].Data) will give you that item

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

v-yutliu-msft
Community Support
Community Support

Hi @skwan ,

Firstly, please note that the right syntax of Patch function shoule be:

Patch(tablename,Defaults(tablename),{.....})   //create a new record

Patch(tablename,one item,{....})  //edit an existing record 

 

Secondly,the formula that you use:

{ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name

This can not represent a record. A record shoule be like this: {field1:....,field2:.....,field3:....}

I suggest you try this:

If(Form1.Mode = New,
ClearCollect(test,AddColumns(Form1.Updates,"ID", Blank(),"Name",First([@PowerBIIntegration].Data).Name))
); //create a collection with the data of Form1,ID and Name, use First(table).fieldname could result a value
Collect('Submissions',test); //user this collection to update
Navigate(Screen3)

Here's a doc about Patch, I think maybe you need to know more about it :

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dkarmoha
New Member

Hi,

 

when I try to connect a data table from Dataverse which has a column (multi-select dropdown) and try to display the column in PowerBI, I can see that it's fetching only the IDs (eg. 11690001,11690002) and not the string values. I even tried using DirectQuery. Please suggest a way to resolve this.

dkarmoha_0-1656396342326.pngdkarmoha_1-1656396357640.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,849)