Frequent Visitor
Posts: 11
Registered: ‎06-12-2016

Max for each subset of records




How could I obtain the max value for each product group in the table? This is what I have imaged to have:


New measure: Maxno = CALCULATE(MAX(pri[pri_no]);allselected(pri[ProductGroup]))


This is a subset of the data:


Product-Group      Pri-No    

A                             1

A                             2

A                             3

B                             1

B                             2

C                             1

D                            1

D                            2

D                            3

D                            4


This is the final wanted result:

A                            3

B                            2

C                            1

D                            4



Thanks for your comments.

Best Regards,




Posts: 46
Registered: ‎03-07-2017

Solved: Max for each subset of records

MAX() Function is used to get the maximum possible value of any field, 

Now just you have to do is Create a measure

MaxNo = MAX(Pri[Pri-No])


Now In the Report view drop a table and into value select the field:-




The table will show the maximum Pri-No for each Product-GroupCapture.PNG