Reply
unknown917
Helper III
Helper III

Automate Flow failing - column contains both numeric & text

I have a column in PBI that Flow is classifying as type: number.  The column contains percentages and '-' when no percentage is calculated.  My trigger is failing.
 
Am I correct in assuming it is failing because Automate cannot read the '-' as a number?  
 
Is there a way to change the type in the execution of the flow? 
1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @unknown917 - Yes, you're correct in suspecting that the '-' values in your percentage column are causing the issue. In Microsoft Power Automate expects consistent data types, so encountering a '-' in a column classified as a number can lead to errors during execution.

Solution 1: Handle the '-' Value in Power BI Before Sending to Power Automate
In Power BI, you can create a new calculated column or use the existing column to transform the values

create a calculated column as below:

Cleaned_Percentage =
IF(Table[Percentage] = "-", BLANK(), Table[Percentage])

This will replace '-' with a blank value or substitute with 0 also fine.

 

It works, and you’ll avoid flow execution failures by ensuring all values Power Automate receives are numeric.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
v-jtian-msft
Community Support
Community Support

Hello,rajendraongole1 ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@unknown917 .I am glad to help you.
I agree with rajendraongole1's suggestion.
1.Preprocess data containing ‘-’ in the power query by replacing it with another character or null.
use Text.Replace M function.
Text.Replace - PowerQuery M | Microsoft Learn
It's also a good idea to use DAX code to make IF judgements on the data.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

rajendraongole1
Super User
Super User

Hi @unknown917 - Yes, you're correct in suspecting that the '-' values in your percentage column are causing the issue. In Microsoft Power Automate expects consistent data types, so encountering a '-' in a column classified as a number can lead to errors during execution.

Solution 1: Handle the '-' Value in Power BI Before Sending to Power Automate
In Power BI, you can create a new calculated column or use the existing column to transform the values

create a calculated column as below:

Cleaned_Percentage =
IF(Table[Percentage] = "-", BLANK(), Table[Percentage])

This will replace '-' with a blank value or substitute with 0 also fine.

 

It works, and you’ll avoid flow execution failures by ensuring all values Power Automate receives are numeric.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





thank you!

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)