Forum Discussion
Farnaz_Raj98
4 years agoFrequent Visitor
use value function to convert text column into number
Hi every one,
I have a column with date/time data type which named "LastCreateDateOrder" and I want to make a measure to find out how many users didn't visit site during 3 last months. so I used below formula:
CALCULATE(COUNT(users[userid]), VALUE(FORMAT(users[LastCreateDateOrder].[Date],"YYYYMMDD"))<=VALUE(FORMAT(DATEVALUE(TODAY()-90),"YYYYMMDD")))
I faced with an error which is "Cannot convert value '' of type Text to type Number." and it's because of this part of formula "VALUE(FORMAT(users[LastCreateDateOrder].[Date],"YYYYMMDD"))".
I don't understand why VALUE function can't convert the date with test format into number!
I tried this formula with CONVERT function too but I havn't got the answer ๐
Can anybody help me please?
I faced with an error which is "Cannot convert value '' of type Text to type Number." and it's because of this part of formula "VALUE(FORMAT(users[LastCreateDateOrder].[Date],"YYYYMMDD"))".
I don't understand why VALUE function can't convert the date with test format into number!
I tried this formula with CONVERT function too but I havn't got the answer ๐
Can anybody help me please?
Hi!
I think that you need to use formula without VALUE and FORMAT
2 Replies
- technolog
Super User
Hi!
I think that you need to use formula without VALUE and FORMAT
- Farnaz_Raj98Frequent Visitor
Yeah it works ๐I don't know why I didn't try itโน๏ธ