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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dax Measure - Today's Date in YYYYMMDD in Number format with leading zeros?

Is it possible to create a measure that would return today's date in YYYYMMDD format but as a whole number? So today's date (May 18th 2020) would return as 20200518 but as a number.

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

 

Column = VALUE(FORMAT(TODAY(), "YYYYMMDD"))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , try like

Column = FORMAT(TODAY(), "YYYYMMDD")*1

 

Even if you create it like

Column = FORMAT(TODAY(), "YYYYMMDD")

You can change data type as whole number

az38
Community Champion
Community Champion

Hi @Anonymous 

 

Column = VALUE(FORMAT(TODAY(), "YYYYMMDD"))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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