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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to get Max value for group of column

HI Team,

I am trying to get maximum value of % column but its always giving me 1. I am using below measure but its giving 1 to non zero values.

MaxHrs = MAXX(ResourceProjection,ResourceProjection[%])
 
ResourceProjection is table name and [%] is value whose max is required. In below exp,for month of June,max % should be 7.88 but MAXX comand giving me 1. For Aug,Max value should be 13.62 but still getting 1. Grouping should be based on Category and Month.   Can anybody please help me in this situation.
 

ashish_18_0-1743044804403.png

ashish_18_1-1743044969107.png

 

Thanks on advance for the solution.

2 ACCEPTED SOLUTIONS

Hi @Anonymous 

Above are the steps I followed to achieve it.

Below is the snapshot of each steps



Screenshot 2025-03-27 104257.png

 

 



 

If this answers your questions, kindly accept it as a solution.
If this is helpful, then pelase give kudos.

View solution in original post

v-csrikanth
Community Support
Community Support

Hi @Anonymous ,
Thank you for reaching out to Microsoft Fabric Community Forum.
Please find below DAX code as per your requirement.

MaxHrs = 
MAXX(SUMMARIZE(ResourceProjection,ResourceProjection[category ],ResourceProjection[Month],"HRS",
SUM(ResourceProjection[%])),
[HRS]
)

Please find attached snap.

vcsrikanth_0-1743080122310.png

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

View solution in original post

5 REPLIES 5
v-csrikanth
Community Support
Community Support

Hi @Anonymous ,
Thank you for reaching out to Microsoft Fabric Community Forum.
Please find below DAX code as per your requirement.

MaxHrs = 
MAXX(SUMMARIZE(ResourceProjection,ResourceProjection[category ],ResourceProjection[Month],"HRS",
SUM(ResourceProjection[%])),
[HRS]
)

Please find attached snap.

vcsrikanth_0-1743080122310.png

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

Anonymous
Not applicable

Hi @v-csrikanth , I have tried with this code and its working now..Thanks for your help!!

mdaatifraza5556
Super User
Super User

Hi @Anonymous 

Try the below steps to get your result 

step1 
       Create a summarized table using below DAX

SUMMARIZETBL =
SUMMARIZE(
    ResourceProjection,
    ResourceProjection[Category],
    ResourceProjection[Month],
    "@total%", SUM(ResourceProjection[%]))
----------------------------------------------------------------------

Steps2

       Create a measure using below DAX 

output =
    CALCULATE(
        MAX(SUMMARIZETBL[@total%]),
        ALLEXCEPT(SUMMARIZETBL, SUMMARIZETBL[Month]
        ))


If this answers your questions, kindly accept it as a solution.
If this is helpful, then pelase give kudos.

Hi @Anonymous 

Above are the steps I followed to achieve it.

Below is the snapshot of each steps



Screenshot 2025-03-27 104257.png

 

 



 

If this answers your questions, kindly accept it as a solution.
If this is helpful, then pelase give kudos.

Anonymous
Not applicable

HI @mdaatifraza5556   I have tried with your code as well and its working fine.  However, vsrikant's code is minimum so its useful while loading process..Thanks for your help!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.