Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a flow to create the item from power BI to sharepoint, but one issue I am facing is the item is still existing in sharepoint even it was cleared out from the power BI report, I am wondering if there is a way to create a flow that I can delete the item from sharepoint when it does not exist in Power BI.
Huge Thanks if there is any detail steps since I am new to power Automate~
- enumerate all items in your sharepoint list
- enumerate all items from your Power BI table (brought in via a DAX query?)
- Do an "Apply to each" inside an "Apply to each" to compare each SharePoint list item against the list of Power BI items. If they match, exit out of the inner loop to run the next outer loop.
- If the inner loop completes (meaning the SharePoint List item has not found a match) delete the SharePoint List item and the move to the next outer loop.
Hi Ibendlin,
Thank you so much for your response!
I am wondering how can I set up that inner loop!
Best regard,
it will be set up for you when you select the list of Power BI items.
I might be confused, Is it like this? do I need to add anystep to do the comparison?
Thank you!!
you don't need to get the sharepoint items inside the outer loop. Do that before the loop starts.
I moved it, I am wondering where should I put the delete item step and how will it make sure it is matching?
Thank you!!!
flip the loops around.
For each sharepoint item: Compare against all Power BI items. if there is a match, exit the inner loop. If not then at the end of the inner loop delete the sharepoint item.
Is this right?
Thank you!
Better. But now you need to insert the actual comparison part so it doesn't delete all sharepoint items - only the ones missing from Power BI.
Yes thats what I am curently missing, I tried to use filter array but it came out nothing.
your sharepoint list item must have a unique identifier. Ideally your Power BI data carries the same primary key.
The idea of comparing to an array is good in theory but in reality it doesn't work reliably (hence the double loop). Sometimes you can use a trick of " string(array) contains value" but that is not very reliable either.
I will Try!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |