Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Don't summarize year - in script

When creating a date table, how do I tell Power BI not to summarize years: 

 

  

 

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I'm a newbie, not sure what you mean? Convert the Year to Date? 

      None of these work... they return 1905

      VAR CY = Format( YEAR ( BaseDate ), "yyyy")
      VAR FY = Format( IF(MONTH([Date]) <7, YEAR(BaseDate), YEAR(BaseDate)+1 ) , "yyyy")
      VAR FY = IF(MONTH([Date]) <7, Format( YEAR ( BaseDate ), "yyyy"), Format( YEAR ( BaseDate )+1, "yyyy") )

  • Just go Data Model select column and the upper left corner change the data type to date 

    • Anonymous's avatar
      Anonymous
      Not applicable

      That doesn't work.... as it is a script ...