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 August 31st. Request your voucher.

Reply
JustinSch
Frequent Visitor

How do I find the Maximum & Minimum of each column?

Hi - I am using a live connection to my SSAS cube so creating columns is not an option. How can i create a measure that shows the maximum and minimum value of each column. In my image below the left is my powerbi matrix i created to replicate the already existing SSRS report i exported to excel (to the right). If you see to the right, this is what I am trying to achieve. I've been trying everything online and nothing has worked yet! Thanks in advance.powerbi min max question.png

 

1 ACCEPTED SOLUTION

In general, let's say you have a table visual summarized by "Thing" and you have a measure in that table visual called "MySum", you can do this:

 

Max Measure =
  VAR __Table = 
    SUMMARIZE(
      'Table',
      [Thing],
      "__MySum", [MySum]
    )
RETURN
  MAXX(__Table,[__MySum])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

So, generally if you want to find the minimum and maximums of columns you use MAX and MIN. If however you are trying to find the minimums and maximums of columns within visuals, you need to use MINX and MAXX. Within your measure, you create a table variable using VAR that emulates the aggregation within the visual and then use MINX and MAXX across that table to grab your min and max. Sort of like a measure totals/aggregation problem. 

 

This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

 

Also, this Quick Measure, Measure Totals, The Final Word might get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Can you provide an actual DAX query or an example? 

In general, let's say you have a table visual summarized by "Thing" and you have a measure in that table visual called "MySum", you can do this:

 

Max Measure =
  VAR __Table = 
    SUMMARIZE(
      'Table',
      [Thing],
      "__MySum", [MySum]
    )
RETURN
  MAXX(__Table,[__MySum])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Well, the links provide actual DAX examples. I can provide an actual example with your data if you can share some example/sample data that emulates your actual data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Kudoed Authors