Thanks for your comments. As I am new to Power BI I am not sure how to do it. As it is a calculated column I do not see it in the query editor. How and where can I change the data type? Your help is highly appreciated.
The error message indicates that the data type of the calculation for if true section is different than the data type for the if false section. Ensure that in an IF statement, the data type of the resulting expression is same for all cases.