cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

1 ACCEPTED SOLUTION
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

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

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

Super User

Hi,

Share a simple dataset and show the expected result.

Regards,
Ashish Mathur
http://www.ashishmathur.com
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

What happens if you simplify your measure?

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors