Forum Discussion

RaptorFox's avatar
RaptorFox
Frequent Visitor
6 years ago
Solved

Calculate an Custom Column based on Values of another Table

Dear Community   I have an issue for displaying a progress of a project compared to its budget. I have two different tables, in one i have the budget, in the other i have all the actuals and the e...
  • v-lionel-msft's avatar
    v-lionel-msft
    6 years ago

    Hi RaptorFox ,

     

    Try the measure.

    Measure = 
    VAR x = 
    CALCULATE(
        SUM('Time Bookings'[ExternalTotalAmount]),
        ALLEXCEPT('Project Data', 'Project Data'[ProjectNumber])
    )
    VAR y = 
    DIVIDE(
        x,
        SELECTEDVALUE('Project Data'[Budget])
    )
    RETURN
    y

     

    Best regards,
    Lionel Chen

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

  • v-lionel-msft's avatar
    v-lionel-msft
    6 years ago

    Hi RaptorFox ,

     

    In "Edit queries", we use M language which doesn't have the SUMX() function.

    Power Query M function reference 

    But we can also use M language grouping aggregation.

     

    Best regards,
    Lionel Chen

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