Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Farnaz_Raj98
Frequent 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?
1 ACCEPTED SOLUTION
2 REPLIES 2
technolog
Super User
Super User

Yeah it works 🙄I don't know why I didn't try it☹️

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.