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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
powerbiguy_
Frequent Visitor

Get the Min and Max values for the entire column

I have the following tables:

powerbiguy__0-1618405513946.png

What I want to achieve is to get the Min and Max values of the entire sales column by branch. I already tried using calculated columns but I have performance issues since I am dealing with a million records.

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @powerbiguy_  ,


According to your description, you could create two measure (max and min ), the following formula to create a measure:

Min = CALCULATE(MIN('Income'[Sales]),ALLEXCEPT('Brancher',Brancher[Id]))
Max = CALCULATE(MAX('Income'[Sales]),ALLEXCEPT('Brancher',Brancher[Id]))

The final output is shown below:

MIN and MAX.jpg

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi @powerbiguy_  ,


According to your description, you could create two measure (max and min ), the following formula to create a measure:

Min = CALCULATE(MIN('Income'[Sales]),ALLEXCEPT('Brancher',Brancher[Id]))
Max = CALCULATE(MAX('Income'[Sales]),ALLEXCEPT('Brancher',Brancher[Id]))

The final output is shown below:

MIN and MAX.jpg

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

selimovd
Super User
Super User

Hey @powerbiguy_ ,

 

are the two tables connected with a relationship?

If yes, then just add the following measure to a table with the branches:

Min Sales = MIN(Income[Sales])

 

For Max the same with the MAX function.

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Yes, but I failed to mention above that I have a slicer for the year and it affects the result.

powerbiguy__0-1618407872317.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.