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
onedayover
Helper II
Helper II

Convert stored date to serial number date

Hi,

I am wanting to add a new column in my table that converts a stored date into a serial number. Can anyone help me with how to do this?

Thanks

 

1 ACCEPTED SOLUTION
HarishKM
Impactful Individual
Impactful Individual

@onedayover Hey you can use below dax fuction but first create a coloum then write these dax function.

Datevalue = DATEVALUE(financials[Date])
once it is create then convert it to a decimal number .
Kindly refer below image.
HarishKM_0-1618909102451.png

Kindly refer these documentation as well  for your reference .Datevalue dax function  

 

View solution in original post

4 REPLIES 4
HarishKM
Impactful Individual
Impactful Individual

@onedayover Hey you can use below dax fuction but first create a coloum then write these dax function.

Datevalue = DATEVALUE(financials[Date])
once it is create then convert it to a decimal number .
Kindly refer below image.
HarishKM_0-1618909102451.png

Kindly refer these documentation as well  for your reference .Datevalue dax function  

 

@HarishKM, thank you ... this is exactly what I was needing to achieve

amitchandak
Super User
Super User

@onedayover , Not very clear 

one is to add an index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

 

of you can create a column like

date key = format([date], "YYYYMMDD")

 

@amitchandak, thank you for your replay and my apologies. What I was trying to convey was that I needed to convert a date such as 28/05/2019 to a serial number format like 43613.

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.