Forum Discussion
Power query : do action when a function is successfull
- Anonymous3 years ago
Hi Syndicate_Admin ,
Please try:
= Table.AddColumn( Table.ExpandTableColumn( Table.AddColumn( #"Colonne fusionnée insérée", "LatitudeLongitude", each try fxPointLookup(Text.Trim(Text.Replace([Address], "&", " and "))) otherwise try fxPointLookup(Text.Trim(Text.Replace([City], "&", " and "))) otherwise fxPointLookup(Text.Trim(Text.Replace([COUNTRY], "&", " and "))) ), "LatitudeLongitude", {"Latitude", "Longitude"}, {"Latitude", "Longitude"} ), "Error", each let addressResult = try fxPointLookup(Text.Trim(Text.Replace([Address], "&", " and "))), cityResult = try fxPointLookup(Text.Trim(Text.Replace([City], "&", " and "))), countryResult = try fxPointLookup(Text.Trim(Text.Replace([COUNTRY], "&", " and "))) in addressResult[HasError] and cityResult[HasError] and countryResult[HasError] )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.