cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

View solution in original post

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] )
)
Try my new Power BI game Cross the River
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?

Try my new Power BI game Cross the River
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

View solution in original post

AVZ Frequent Visitor
Frequent Visitor

Re: Using MIN and WHERE

It has been resolved thanks for helping me out!

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)