Forum Discussion
Dataflow Gen2 MashupException.Error We cannot convert the value null to type Number
- 1 year ago
Hi v-kpoloju-msft, rohit1991 and collinq. I found the solution! The issue was with a table I was merging into another. The key was a number, but in one of the tables, the service converted it to text. As a result, the merge returned only null values. When I performed operations on that merged column, the error occurred.
The strangest part is that, in the dataflow preview, the column appeared to merge correctly, making it seem like everything was working correctly. It wasn't until I created another dataflow referencing a pared-down version of the first one that the errors became visible in the preview. Thanks again for everyone reaching out!
Hi data_4_good,
Thank you for reaching out to the Microsoft fabric community forum. Thanks rohit1991, and collinq, for your inputs on this issue.
I have reviewed the details you provided and have reproduced the scenario on my end, where it works correctly. Please follow the steps below, which may resolve the issue.
Please open your workspace, create a Dataflow Gen2 activity, and then import your data into Dataflow Gen2.
Right click on the Sales Amount in the sample data, select the option Replace values, and follow the steps shown in the image below:
Once the task is completed, replace the values, and it will display numbers instead of null values:
I have provided alternative workarounds here that may resolve the issue in addition to replacing the values:
- Instead of converting data types immediately, first clean up the data, then apply Number.FromText() at the final step.
- Instead of replacing null values directly, you can use the try function in Power Query M to handle conversion errors dynamically.
kindly refer the below link for more information:
Replace values and errors - Power Query | Microsoft Learn
Table.ReplaceValue - PowerQuery M | Microsoft Learn
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.