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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lhdp
Helper I
Helper I

Max of a month by year with daily data

Hello,

 

Simple need : I have daily data : Date & Value for 2 years.

I just need a table with Year and the month in the year where I have the maximum of sum of daily value.

 

I tried with this command which send the sum of each month :

EVALUATE
SUMMARIZE(sum_max, sum_max[Date].[Année], sum_max[Date].[Mois], "Sum", SUM(sum_max[Value]))

sum_max.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

And I want to obtain : 

2021 / 1693 (Max monthly sum of 2021)

2022 / 1785 (Max monthly sum of 2022)

with the year in inner context.

 

Howe I can do that ? Nested Summarize ? Add a column with the monthly value for the current year for each line and average to calculate the result ? Thanks in advance. Laurent 

 

 

 

 

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

You should be able to wrap your summarize statement with MAXX.

MAXX(
SUMMARIZE(sum_max, sum_max[Date].[Année]sum_max[Date].[Mois]"Sum"SUM(sum_max[Value])),
[Sum],
)

This will give the max value for the table created with the summarize function. Adding the Annee column to your visual will provide the desired context.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
lhdp
Helper I
Helper I

Sorry, It's finally ok. I've created as a column and not as a measure. It's ok with measure. I close it and I thank you.

jgeddes
Super User
Super User

You should be able to wrap your summarize statement with MAXX.

MAXX(
SUMMARIZE(sum_max, sum_max[Date].[Année]sum_max[Date].[Mois]"Sum"SUM(sum_max[Value])),
[Sum],
)

This will give the max value for the table created with the summarize function. Adding the Annee column to your visual will provide the desired context.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you. I take a step but I meet this problem : the value in not contextualized with the year in the inner filter. The value is the same for the 2 years (1785 : the grand max) instead of beiing different (1693 & 1785)

 

sum_max.PNG

Can you share the code you wrote?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.