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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
sshekar7
Frequent Visitor

data formating results in 1905

I have two fields employees and Year. I am using this formula to calculate growth rate.

 

Growth % = divide (sum(Data[EMPLOYEES]) - calculate(sum(Data[EMPLOYEES]),SAMEPERIODLASTYEAR(Data[YEAR])), calculate(sum(Data[EMPLOYEES]),SAMEPERIODLASTYEAR(Data[YEAR])))

 

I am using sum because i have other fields which slices the employment data.

 

This gives error because Year is not date field. In "Modeling" tab, if i set the format to date then all the values become 1905. I understand its converting year 2013 to number which excel understands but is there is a easier way to fix this? 

 

I assume there has to be easier way to convert year values to date that PBI can use for calculations like this.

1 ACCEPTED SOLUTION
Habib
Continued Contributor
Continued Contributor

You can use the below method to convert your year to date.

 

  1. Convert the data type of your Year column to Tex
  2. Add custom Column to and use below formula to append date and montht to Year filed

dateformat.png

  1. convert the new column type to date

 

Hopefully this will help.

View solution in original post

3 REPLIES 3
Habib
Continued Contributor
Continued Contributor

You can use the below method to convert your year to date.

 

  1. Convert the data type of your Year column to Tex
  2. Add custom Column to and use below formula to append date and montht to Year filed

dateformat.png

  1. convert the new column type to date

 

Hopefully this will help.

Anonymous
Not applicable

Thanks for the Solution, but I have to use this to get the right solution:

Date = "1/1/" & INT([Year])

Thanks Habib.. it worked..

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.