Forum Discussion

Mseeram's avatar
Mseeram
Frequent Visitor
4 years ago
Solved

Calculate min based on the selected values

Hello everyone, I am trying to get the minimum amount based on selecting few subvendors which I could able to achive it, now I need to create an other table comparing each subvendor with the ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Mseeram ,

     

    I created three measures.

    Target(min) =
    CALCULATE (
        MIN ( 'Sample'[Cost] ),
        FILTER (
            ALL ( 'Sample' ),
            [Item Code] = MAX ( 'Sample'[Item Code] )
                && [Item Desc] = MAX ( 'Sample'[Item Desc] )
        )
    )
    
    Diff = SUM('Sample'[Cost])-[Target(min)]
    Percentage = DIVIDE([Diff],SUM('Sample'[Cost]))

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.