Forum Discussion

awitt's avatar
awitt
Helper III
4 years ago
Solved

True Allocated Average

Trying to return the Allocated Cost Per OrderID column because the value in the "Cost" column is the total final cost for the Tracking Number. Essentially you divide the Cost value by however many un...
  • parry2k's avatar
    4 years ago

    awitt you can add a column using following expression:

     

    Allocated Cost per order id = 
    VAR __numberofOrders = CALCULATE ( COUNTROWS ( YourTable ), ALLEXCEPT ( YourTable, YourTable[TrackingNumber] ) )
    RETURN
    DIVIDE ( YourTable[Cost], __numberofOrders )

     

     

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.