Forum Discussion

ChrisPBI's avatar
ChrisPBI
Advocate III
10 years ago
Solved

Getting Year from date.

Hello,

 

I try to get only the year from my date.

 

The function YEAR(date) always deliveres me the sum.

 

Only whe I use a table I can say don't summarize.

 

But the column can't be used for any visual this way.

 

Thanks for helping.

 

Regards,

Chris

  • jahida's avatar
    jahida
    10 years ago

    Ah ok. Try this:

     

    Click on the year column in your data model, go to the Modeling tab at the top, and then go to Default Summarization and select "Do Not Summarize". That should solve many of your problems.

    Hope that helps!

3 Replies

  • jahida's avatar
    jahida
    Impactful Individual

    Not quite sure what the objective is. YEAR(Date) is definitely the way to get the year of a date, why isn't that working for you? Do you have a particular use case in mind?

    • ChrisPBI's avatar
      ChrisPBI
      Advocate III

      Hi,

       

      a use case could be to show the total emissions over the years.

       

      Here the result:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      But the result should be a line with the years as X-Axis.

       

      I would expect when I do: Release Year = YEAR('Models'[Release Date]) that the resulting column always shows the years without summing everything.

       

      Thanks,

      Chris

      • jahida's avatar
        jahida
        Impactful Individual

        Ah ok. Try this:

         

        Click on the year column in your data model, go to the Modeling tab at the top, and then go to Default Summarization and select "Do Not Summarize". That should solve many of your problems.

        Hope that helps!