Forum Discussion
Anam
9 years agoRegular Visitor
String Value in Calculating Measures
Hey, I'm trying to calculate the sum of sales by using the DAX measure function. However, when I try to plot this measure to a visual like a bar chart, it gives an error and says this sum function ca...
TomMartens
9 years agoSuper User
Hey,
this is typically happen, if the data type of the column you are using in your SUM(...) function is not a numeric one.
To change this, most of the times it's sufficient to go to the model ribbon
Mark the column in the fields pane and change the data type.
Be aware of the fact, that if you change the data type it sometimes can also affect your visuals, this is due to the default, that numeric columns are treated as continuous variables on axis. This can of course can also be changed very easily.
Sometimes it could be a little harder, due to the fact that a data quality issue sneaked into your data model and this issue implicity determined the initial data type of the column.
Hope this helps