Forum Discussion
Convert string to number in DAX Function
Hello Community,
I connected to the source data through the online mode of the AAS model in Power BI, so I am not able to change formats of the datasets using the conventional ways (power query, for instance). Before doing the calculation, I need to convert the string to numerical value. For that, I used "Format", "value", or "convert", none of them worked for me because I cannot find the column in those formulas. For example, I have a string column "201908" and want to convert a value of 201908. Thank you.
qsong - Use MAX or MIN
Finally I used VALUE(MAX()) to refer the column names, and it works for me.
Thank you.
9 Replies
- Greg_DecklerCommunity Champion
qsong - Try [Column] * 1
- qsongHelper II
Hi Greg_Deckler,
Thank you for your suggestion.
I cannot find the column except I have to add something like sum before the column; However, column has a string value, so sum does not work on the case.
Best, Qianru
- Greg_DecklerCommunity Champion
qsong - Use MAX or MIN