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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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 PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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