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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mosman
Frequent Visitor

Min and Max Measures are wrong

I have a dashboard with minimum and maximum balance.

Here is Dax for Max Balance:

Maximum Balance =
VAR _mb =
CALCULATE (
MAX ( vw_inactive_account_shares[share_balance_amount] )
)
RETURN
IF ( _mb = BLANK (), 0.00, _mb )
 
and here is the Dax Min Balance:
Minimum Balance =
var _minb =
CALCULATE(
MIN(vw_inactive_account_shares[share_balance_amount])
)


return
IF(
_minb=BLANK(),
0.00,
_minb
)
max.PNGmin.PNG
as you would notice I sorted the table twice (once descending and another ascending). you would also notice, the numbers I am showing in the cards are the penultimate number and not the true max and min balance.
why would that happen, please help me.
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Your max/Min is your line-level max or Min. And you are grouping data by a particular category. If means the balance is summed up.

Make your balance or some other field as un summarized or add a line-level key and check.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
dax
Community Support
Community Support

Hi mosman,

It seems that your Max and min is applied on all table, so it won't changed by slicer. If possible, could you please inform me in details( such as your data sample and your expected output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

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

amitchandak
Super User
Super User

Your max/Min is your line-level max or Min. And you are grouping data by a particular category. If means the balance is summed up.

Make your balance or some other field as un summarized or add a line-level key and check.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Ashish_Mathur
Super User
Super User

Hi,

Share a simple dataset and show the expected result.


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

What happens if you allow a visual to summarize balance? e.g. add them to a card and change summarize to Maximum or Minimum

minmax.png

What happens if you simplify your measure? 

MAX(  MAX( 'Table'[Balance] ), 0 )

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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