Forum Discussion

M-P's avatar
M-P
Frequent Visitor
9 years ago
Solved

Help with adding new custom columns in table in report view

Hello, I need help with formula to add 2 new custom columns in the table in report view to calculate the "Var" =Forecast - Budget,  and Ach = Actual/Budget as shown below. First: Below is the screen...
  • tringuyenminh92's avatar
    9 years ago

    Hi M-P,

     

    There are some approaches that could achieve your expectation, i will show you one of them by creating 5 calculated measures(forecast, budget, actual, variance and % of actual/budget).

    • Right click in your table name, choose new measure 
    • Create Actual measure:

     

    Actual = CALCULATE( SUM(Data[Amount]),Data[Scenario]="Actual")

     

    • Create Budget measure:
    Budget = CALCULATE( SUM(Data[Amount]),Data[Scenario]="Budget")
    • Create Forecast measure:
    Forecast = CALCULATE( SUM(Data[Amount]),Data[Scenario]="Forecast")
    • Create Variance measure by reuse 2 measures above:
    Variance = [Forecast]-[Budget]
    • Create % budget/actual measure
    % Actual amount / the Budget amount = DIVIDE( [Actual],[Budget])

    Choose matrix control and put these measures to Values area of matrix

     

     

    Sample file and data for reference

     

     

     

  • tringuyenminh92's avatar
    9 years ago

    Hi M-P,

     

    Just replace Amount field by drag&drop Actual measure to Values area. I forgot that when saving. It's fine to me for any concern, hope you love PBI and DAX ^_^