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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
danyeungw
Helper II
Helper II

SUMMARIZE with Group By year, month, day but it summed the year and the day

The following should group by "Trends[release_date].[Year], Trends[release_date].[Month], Trends[release_date].[Day]" and sum(rends[amt]) by year, month, and day. It ended up summing the year, day, and amt. What was it wrong? Thanks.

 

Table = SUMMARIZE(Trends, Trends[release_date].[Year], Trends[release_date].[Month], Trends[release_date].[Day], "Amount", SUM(Trends[amt]))

MonthYearDay Amount 
January40440324   3,917.95
February38418257   6,205.80
March46506368   8,474.84
April44484347   6,129.23
May42462621   8,331.89
June42462325      690.20
July40440327   9,910.26
August46506360   8,552.71
September42462348   8,654.95
October1415448   4,857.30
1 ACCEPTED SOLUTION

@danyeungw , If the issue where they were getting summarized by default. You can change the property in column tools

amitchandak_0-1665799182117.png

 

Making it text is not the best solution, if that was done for same purpose

 

View solution in original post

3 REPLIES 3
danyeungw
Helper II
Helper II

Thanks @Shaurya. I just figured it out. I had to change the Year and Day to text instead of number. It doesn't really make sense to me that Year and Day were grouped by, but it worked. 

@danyeungw , If the issue where they were getting summarized by default. You can change the property in column tools

amitchandak_0-1665799182117.png

 

Making it text is not the best solution, if that was done for same purpose

 

Shaurya
Memorable Member
Memorable Member

Hi @danyeungw,

 

I can't say for sure since I don't see your source data but here's the code that I tried and it gave the expected result:

 

Summary = SUMMARIZE('Table','Table'[Release Date].[Month],'Table'[Release Date].[Year],'Table'[Release Date].[Day],"Sum",SUM('Table'[Amount]))

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors