cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mbixby
Frequent Visitor

Get the category Name with the MIN value

I am trying to place a card highlighting the facility with the biggest net loss on a report.  The net loss is a Measure calculation, _Net New, and the lowest value is the biggest 'loss'. 

I used a quick measure to calculate the smallest gain, but am stumped how to tie this back to the category name to display in a card.

The measure for calculating biggest drop:

_Largest Net Loss by Facility = 
MINX(
    KEEPFILTERS(VALUES('Facilities'[FacilityName])),
    CALCULATE(_Measures[_Net New])
)
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @mbixby ,

I create a simple example. Is this what you want?

Facility of Minimal Net = 
CALCULATE (
    MIN ( 'Facilities'[FacilityName] ),
    FILTER ( Facilities, [Net]= MINX ( ALL(Facilities), [Net] ) )
)

facility.PNG

 

Best Regards,

Icey

 

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

4 REPLIES 4
Icey
Community Support
Community Support

Hi @mbixby ,

I create a simple example. Is this what you want?

Facility of Minimal Net = 
CALCULATE (
    MIN ( 'Facilities'[FacilityName] ),
    FILTER ( Facilities, [Net]= MINX ( ALL(Facilities), [Net] ) )
)

facility.PNG

 

Best Regards,

Icey

 

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

Hi @Icey thank you for the solution . Can you please guide what changes need to be taken in order to have second lowest value. In this case it should return 'B'? Many thanks in advance. 

mbixby
Frequent Visitor

Hi @imr ,

You will have to identify the second lowest value - either with TOPN (with ASC sort) or a RANK method - and then perform a similiar matching operation as @Icey recommended.

See https://community.powerbi.com/t5/Desktop/Return-second-biggest-value/td-p/688506 for example of TOPN.

 

hth!

-mbixby

Ashish_Mathur
Super User III
Super User III

Hi,

Share some data and show the expected result.


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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors