Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community ,
i made this formula and its makinf # error ( expressions that yeild variant data-type cannot be used to define calculated columns
Solved! Go to Solution.
Hi @bhelou ,
I guess the column of EMPLOYEE_ID is number type and the lookup_Name is the text type. Your expression returns either number or text. But the data in calculated column need to be the same type. You could try using the function of FORMAT to return the EMPLOYEE_ID to text.
Employee_Name =
IF (
Employee_ID_Name[lookup_Name] = "",
FORMAT ( Employee_ID_Name[EMPLOYEE_ID], "" ),
Employee_ID_Name[lookup_Name]
)
Hi @bhelou ,
I guess the column of EMPLOYEE_ID is number type and the lookup_Name is the text type. Your expression returns either number or text. But the data in calculated column need to be the same type. You could try using the function of FORMAT to return the EMPLOYEE_ID to text.
Employee_Name =
IF (
Employee_ID_Name[lookup_Name] = "",
FORMAT ( Employee_ID_Name[EMPLOYEE_ID], "" ),
Employee_ID_Name[lookup_Name]
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |