Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How do I convert a columns datatype in DAX?

Hoping this will be easy to answer.    I have a table which contains student results. Because of the different types of result that exist (9 to 1, and A to E), the data type has to be a string.   ...
  • AmiraBedh's avatar
    2 years ago

    Can you try the following ? :

    Total Grades =
    SUMX(
    FILTER(YourTableName, ISNUMBER(VALUE(YourGradeColumn))),
    IF(
    ISERROR(VALUE(YourGradeColumn)),
    0,
    VALUE(YourGradeColumn)
    )
    )