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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.