View My Drafts
PFA the corrected file. Please check. You can re-connect the csv files from your end.
The issue, as was mentioned by others, was in the Population-country-2050-2100.csv. As shown below the error shows in 3 rows in all the columns. Since some of these columns are number types, it throws the error in power BI.
However, you have two options to remove errors. #NA etc are errors and you should avoid replacing by the normal replace method. You should replace / remove the errors with explicit M functions for errors.The first option is to remove all the error rows using 'Table.RemoveRowsWithErrors'. This will remove all the rows with errors. From UI, you access it as below:
In the pbix I have used this.
Second is the one I had mentioned in the thread earlier viz replace errors. In this case, the replace should happen immediately after the change type. But then, you have to do this individually in all the columns where the format error happens. In your case, the fields population-male , population-female was changed to decimal later in the step. The replace for these should happen immediately after this. I have created an additional query to show this. You can look at the steps. Also, in the desktop, you can view both the tables and see that the table using the 1st method has 3 rows less than the 2nd method table as the 3 error rows were removed in the 1st method.Hope this helps. If not let me know.
Good morning all,
I want to thank everyone who helped me solve this problem of error. Now I can solve this kind of problem by myself. But I will still need you for other problems; I am still a beginner!