Forum Discussion

mb0307's avatar
mb0307
Responsive Resident
4 years ago
Solved

Percentage by PO Number

Hi all,   I want to calculate percentage of qty per PO Number (example below so by PO1 and PO2).     I want to use percentage to be dynamically calculated (but always by PO Number) if I am...
  • VahidDM's avatar
    4 years ago

    Hi mb0307 

     

    Try this measure:

    Percentage by PO Number =
    VAR _Qty =
        MAX ( 'Table'[Qty] )
    VAR _TotalQtyPO =
        CALCULATE ( SUM ( 'Table'[Qty] ), ALLEXCEPT ( 'Table', 'Table'[PO Number] ) )
    RETURN
        _Qty / _TotalQtyPO

     

    Output:

     

     

     

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

    Appreciate your Kudos!!