Forum Discussion

AVZ's avatar
AVZ
Frequent Visitor
8 years ago
Solved

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.

  • 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

  • prateekraina's avatar
    prateekraina
    Memorable Member

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

    MinimumDuration = MIN(DURATION)

    • AVZ's avatar
      AVZ
      Frequent Visitor

      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.

      • Zubair_Muhammad's avatar
        Zubair_Muhammad
        Community Champion

        HI AVZ

         

        Try this MEASURE

         

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