Forum Discussion

tkoopmann's avatar
tkoopmann
Frequent Visitor
2 years ago
Solved

DateValue Year Issue

I'm having issues with DATEVALUE pulling the correct year. It's pulling 2024 for all date years. This functioned correctly prior to the new year.

 

Examples below. Month & Year is a text column, pulling from a typical dimDate table where Month & Year = FORMAT(dimDate[Date], "MMM-YY")

I have alternatively used 

"Date", DATE(YEAR(dimDate[Month & Year]),MONTH(dimDate[Month & Year]), 1
in summarize, but the issue remains the same with a report refresh for this year. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    tkoopmann  Have you tried using the below calculated column for Month & Year instead? I found that after changing "YY" to "YYYY" the years were pulled in correctly by the DATEVALUE function.


     Month & Year =
    FORMAT ( 'dimDate'[Date], "MMM-YYYY" )
  • That works until I change the column to a date type. I'm needing "Date" in the Summarize function to be a date type to tie back to the dimDate table.

     

    *uness there is a more efficient way to average monthly % charged for the year.  I could probably use a measure instead of this table altogether. 

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    tkoopmann  Have you tried using the below calculated column for Month & Year instead? I found that after changing "YY" to "YYYY" the years were pulled in correctly by the DATEVALUE function.


     Month & Year =
    FORMAT ( 'dimDate'[Date], "MMM-YYYY" )
    • tkoopmann's avatar
      tkoopmann
      Frequent Visitor

      That works until I change the column to a date type. I'm needing "Date" in the Summarize function to be a date type to tie back to the dimDate table.

       

      *uness there is a more efficient way to average monthly % charged for the year.  I could probably use a measure instead of this table altogether. 

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        How is that not working for you? I played around with some sample data and was able to make it work.