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
DaniEMIT
Frequent Visitor

DAX to calculate MAX of SUM Per Month

Hi All,

i've this issue: i need a DAX to calculate per each item the MAX sum from all the month.

For Example:

ITEMMONTHQtySold
AAAJAN10
AAAJAN20
AAAFEB5
AAAFEB11
AAAFEB3
BBBJAN45
BBBJAN3
BBBJAN8
BBBFEB12
BBBFEB11


The DAX i need must give as results:

AAA = 30

BBB = 56

Have you any ideas?

Thanks in advance,

Daniele

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @DaniEMIT

 

You can create a measure with below code and put it in a table visual along with the ITEM column. 

Measure = 
var tbl = SUMMARIZE('Table','Table'[MONTH],"Total Sold",SUM('Table'[QtySold]))
return
MAXX(tbl,[Total Sold])

vjingzhang_0-1656038617749.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @DaniEMIT

 

You can create a measure with below code and put it in a table visual along with the ITEM column. 

Measure = 
var tbl = SUMMARIZE('Table','Table'[MONTH],"Total Sold",SUM('Table'[QtySold]))
return
MAXX(tbl,[Total Sold])

vjingzhang_0-1656038617749.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

mohammedadnant
Impactful Individual
Impactful Individual

Hi @DaniEMIT 

 

To get the max of Sum per month, please watch this video

https://youtu.be/eqqMtXN_D8M

like this, you need to create your DAX

mohammedadnant_0-1655799060144.png

 

 

Thanks & Regards,

Mohammed Adnan

Learn Power BI: https://www.youtube.com/c/taik18

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

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18

Thank You. I am a beginner. Like your solution. Simple and clear. It worked for me perfectly. 

Hi Mohammed,

thanks for your reply.

Your solution is not working as i need. With the DAX, i need only one result per Item. The result must be the max value of the sum per month.

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.