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
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
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.