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
yatinpurohit
Helper I
Helper I

Strange result for YEAR() function

I have a date column in SharePoint list which a query is retrieving. I have created a calculated column -

FY = YEAR(Table1[Start date])
This gives result: 14133
 
Sample date is 31-01-19. I would expect the result to be 2019.
1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

Year() will produce a numeric column. The default summarize by behaviour for a numeric column is to sum it. So 14133 is probably 2019 * the number of rows in your table. You can change this behaviour by clicking on the column then changing the "Default Summarization" property in the modelling ribbon in Power BI.

 

2019-04-DoNotSummarize.png

 

If you change it to "Do not summarize" Power BI will effectively do a "group by" and just show the distinct values for the year.

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

Year() will produce a numeric column. The default summarize by behaviour for a numeric column is to sum it. So 14133 is probably 2019 * the number of rows in your table. You can change this behaviour by clicking on the column then changing the "Default Summarization" property in the modelling ribbon in Power BI.

 

2019-04-DoNotSummarize.png

 

If you change it to "Do not summarize" Power BI will effectively do a "group by" and just show the distinct values for the year.

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.