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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Finding values of a column corresponding to MAX value of another column

Hi All,

 

I have a simple problem, any sort of help is appreciated. So my table has project details like

Project_DataProject_Data

And i need to get the largest project by size so i created a simple measure of MAX of SIZE i.e MAX('Project_Data'[Size])- but when i try to select server and project name in the visual interface, all the projects are listed. i just need a matrix of largest projects by size with project name and server.

 

Thanks in Advance  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

It seems that you miss GK01 server in  your expected result.

Firstly, right click your table and select “New Measure” and apply the following formula.

Measure = CALCULATE(MAX(Project_Data[Size (MB)]),ALLEXCEPT(Project_Data,Project_Data[Server]))

Secondly, right click your table and select “New Column” and then apply DAX below.
Column = IF(Project_Data[Files]= CALCULATE(MAX(Project_Data[Files]),ALLEXCEPT(Project_Data,Project_Data[Server])),1,0)

Thirdly, create a table visual as shown in the screenshot below, then drag the new column to Visual level filters and set its value to 1.
1.JPG

Regards,
Lydia

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

There are 3 Projects with a size of 120.  What result are you expecting?  Show your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Interkoubess
Solution Sage
Solution Sage

Hi @Anonymous,

 

Did you try Calculate ( MAX('Project_Data'[Size])).

 

Please elaborate if it is not what you want by giving us a sample data ( easy to copy and paste for example not an image), with your expected results ( views).

 

Thank you.

 

 

Anonymous
Not applicable

Sure, Sorry about the confusion, so this is my data:

ProjectServerSize (MB)FilesCreated ByCreated
ASC0220400a1/27/2016 14:00
BSC02601020b7/27/2017 14:45
CJF01530c3/27/2015 15:13
DIL011203029d6/27/2016 15:34
EGK01802001e12/3/2016 15:38
ISC0220400f1/27/2016 14:00
JSC0260102g7/27/2017 14:45
KJF01530h3/27/2015 15:13
FIL01120300i6/27/2016 15:34
XJF0180400j9/7/2017 12:03
YJF025030a9/8/2017 17:45

 

And the result am expecting to get is Project details(name,Files) with max size by server i.e 

ProjectServerSize (MB)FilesCreated ByCreated
BSC02601020b7/27/2017 14:45
DIL011203029d6/27/2016 15:34
XJF0180400j9/7/2017 12:03
YJF025030a

9/8/2017 17:45

 

And so on

 

Thanks

Anonymous
Not applicable

@Anonymous,

It seems that you miss GK01 server in  your expected result.

Firstly, right click your table and select “New Measure” and apply the following formula.

Measure = CALCULATE(MAX(Project_Data[Size (MB)]),ALLEXCEPT(Project_Data,Project_Data[Server]))

Secondly, right click your table and select “New Column” and then apply DAX below.
Column = IF(Project_Data[Files]= CALCULATE(MAX(Project_Data[Files]),ALLEXCEPT(Project_Data,Project_Data[Server])),1,0)

Thirdly, create a table visual as shown in the screenshot below, then drag the new column to Visual level filters and set its value to 1.
1.JPG

Regards,
Lydia

Anonymous
Not applicable

@Anonymous Thank you! does exactly what i was expecting 🙂 

Hi,

 

I am still not clear.  SC02 has two instances of maximum sizes (MB) - 60.  Which one should be considered?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.