Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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]))
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
Solved! Go to Solution.
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.
Proud to be a Super User! | |
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.
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.
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)
Can you share the code you wrote?
Proud to be a Super User! | |
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |