The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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! | |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
71 | |
52 | |
50 |
User | Count |
---|---|
123 | |
119 | |
76 | |
64 | |
60 |