I am trying to create a state that says “If a column is blank, type na” If the column is not blank, or is a number greater than 0, then perform the following divide calculation. I have put the code below. I am getting the error listed below it:
@stiefel.ed Do your calculated columns have the same Data Type? It usually occurs when you have both number value & text value in one calculated column.
It would be helpful if you can attach your pbix and excel file.
Yup, you’re trying to put 2 different data types in the same column, so the error. You’ll need to change one of them, either the na to 0, or format the number as a string.
Greg
You could do the calculation as you want, then convert the result to a string, but that means you’ll need to do that for any totals as well, as auto-totalling won’t work.
Greg
Hi @stiefel.ed, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box. Also, we’ve recently launched the Enterprise DNA Forum User Experience Survey, please feel free to answer it and give your insights on how we can further improve the Support forum. Thanks!