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
Anonymous
Not applicable

Max per category in a column

Hi Community,

 

i'm struggling with a seemingly simple problem :).

 

I have a column with Items (Item ID), multiple item ID's possible. Next to that a calculated column with count rows:

 

Item ID   Count rows

H32WB    3

H32WB    5

A78VB     27

A78VB    36

 

I would like to create a new calculated column which displays the highest value from count row. But the highest per Item ID. So for example the highest for Item H32WB would be 5, for A78VB 36 and so on. Many thanks for your help :).

1 ACCEPTED SOLUTION

for a calculated column:

NewCol =
CALCULATE ( MAX ( Table1[Count rows] ), ALLEXCEPT ( Table1, Table1[Item ID] ) )

View solution in original post

4 REPLIES 4
AlB
Super User
Super User

Hi @Anonymous 

1. Place ItemID in the rows of a table visual

2. Create a simple measure and place it in the visual

Measure = MAX(Table1[Count rows])

 

Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.

Cheers  Datanaut

Anonymous
Not applicable

Hi,

 

many thanks for the reply. But that will not give me the max per category, just the max for the column.

Further I need a solution within a calculated column not measure :).

 

If my question was not clear.

In column Item ID's are double Item ID's, count row indicates the counted rows (lines). I need the max counted row per Item ID. So if there are for example 2 item IDs with ID ABCD123, one with value 4 and one with value 5 -> I need to see the max value in this case 5.

for a calculated column:

NewCol =
CALCULATE ( MAX ( Table1[Count rows] ), ALLEXCEPT ( Table1, Table1[Item ID] ) )
Anonymous
Not applicable

Many thanks!

Problem solved!

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.

Top Solution Authors