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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AVZ
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

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
Memorable Member
Memorable Member

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

MinimumDuration = MIN(DURATION)

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.

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

HI @AVZ

 

Try this MEASURE

 

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

Regards
Zubair

Please try my custom visuals

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.

@AVZ

 

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


Regards
Zubair

Please try my custom visuals

It has been resolved thanks for helping me out!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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