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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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