Forum Discussion
Load to Dataverse only when there are rows present in Power Query
- Anonymous2 years ago
Hi Magnolia ,
Based on your description, you are dealing with empty tables due to right-reverse joins in the Power BI data flow.
Since you are already using Power Apps and Power BI, integrating Power Automate to conditionally trigger the data flow may be a viable solution. You can set up a Power Automate process that checks for rows in the results of a Power BI data flow. If a row exists, it goes ahead and triggers the data flow in Power Apps, loading the data into Dataverse. This approach allows you to bypass the steps that cause errors when no rows are returned.
Using conditionals - Power Automate | Microsoft Learn
Of course, to directly address the empty table issue in the Power BI data flow, consider implementing conditional logic in the M query in the Power Query Editor. You can use this function to check whether the result of a right-reverse join is an empty table. If it is, you can return a table structure with no rows instead of letting the process error out.
You can try this codelet Source = <RightAntiJoin>, Output = if Table.IsEmpty(Source) then #table(<Columns>, {}) else Source in OutputBest regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Magnolia ,
Based on your description, you are dealing with empty tables due to right-reverse joins in the Power BI data flow.
Since you are already using Power Apps and Power BI, integrating Power Automate to conditionally trigger the data flow may be a viable solution. You can set up a Power Automate process that checks for rows in the results of a Power BI data flow. If a row exists, it goes ahead and triggers the data flow in Power Apps, loading the data into Dataverse. This approach allows you to bypass the steps that cause errors when no rows are returned.
Using conditionals - Power Automate | Microsoft Learn
Of course, to directly address the empty table issue in the Power BI data flow, consider implementing conditional logic in the M query in the Power Query Editor. You can use this function to check whether the result of a right-reverse join is an empty table. If it is, you can return a table structure with no rows instead of letting the process error out.
You can try this code
let
Source = <RightAntiJoin>,
Output = if Table.IsEmpty(Source) then #table(<Columns>, {}) else Source
in
Output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you so very much!! it worked!