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

Using MIN and WHERE

Hi,

 

I have a table with two columns named FORWARDER_CODE and DURATION, I would like to use the min max and avg functions on duration and show the results per unique forwarder_code. Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
prateekraina New Contributor
New Contributor

Re: Using MIN and WHERE

Hello,

 

After creating the measure, try creating a table and put forwarder code and this measure. You should see the minimum for each forwarder code. If it is not coming then you must have more than two tables in your dataset and then the issue is there in relationship between them

7 REPLIES 7
prateekraina New Contributor
New Contributor

Re: Using MIN and WHERE

Try using Quick Measures and or else you can create measures of your own.
Example:

MinimumDuration = MIN(DURATION)

AVZ Frequent Visitor
Frequent Visitor

Re: Using MIN and WHERE

I have tried this, but the problem is that it shows the min value of the whole column instead of the min value per forwarder code.

Super User
Super User

Re: Using MIN and WHERE

HI @AVZ

 

Try this MEASURE

 

MEASURE=
CALCULATE (
    MIN ( TableName[Duration] ),
    ALLEXCEPT ( TableName, TableName[FORWARDER_CODE] )
)
AVZ Frequent Visitor
Frequent Visitor

Re: Using MIN and WHERE

Hi Zubair,

 

Thank you for your comment!

I get the same result i got earlier while using: MIN(test123[Duration]

It shows me the lowest value in the duration column, I would like it to show me the lowest value per FORWARDER_CODE.

I have forwarder codes named DPD, UPS, DHL, PNL and ROY, I would like to see the min value per each one of those codes.

Super User
Super User

Re: Using MIN and WHERE

@AVZ

 

Could you post a snaphot of the Table and RESULTS you are getting?

prateekraina New Contributor
New Contributor

Re: Using MIN and WHERE

Hello,

 

After creating the measure, try creating a table and put forwarder code and this measure. You should see the minimum for each forwarder code. If it is not coming then you must have more than two tables in your dataset and then the issue is there in relationship between them

Highlighted
AVZ Frequent Visitor
Frequent Visitor

Re: Using MIN and WHERE

It has been resolved thanks for helping me out!

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 292 members 3,665 guests
Please welcome our newest community members: