Forum Discussion

mhr08004's avatar
mhr08004
Frequent Visitor
2 years ago
Solved

Same Table Calculations and Look-Ups

I consider myself an Excel expert but the scope of my job is pushing my into BI tools. In Excel, I've done this a million times using various formulas... Xlookups, Sumproducts, Nested IFS... get this...
  • amitchandak's avatar
    2 years ago

    mhr08004 , You can try new calculated columns or measures

     

    can be used as a column and measure

    Total Job Budget = CALCULATE(SUM('Table'[Budget Cost]), ALLEXCEPT('Table', 'Table'[Job Number]))


    new column if Total Job Budget is a column
    Pct of Cost = DIVIDE('Table'[Budget Cost], [Total Job Budget])


    New measure , if Total Job Budget is meausre
    Pct of Cost = DIVIDE(Sum('Table'[Budget Cost]), [Total Job Budget])

    a new measure
    Has Cost in Cat 2 =
    VAR Cat2Budget = CALCULATE(SUM('Table'[Budget Cost]), 'Table'[Cost Category] = "Cat 2")
    RETURN
    IF(Cat2Budget > 0, "Yes", "No")