Forum Discussion

ljimenezvega84's avatar
2 years ago
Solved

Actual vs Plan Comparisson

Hi everyone, maybe a rockee question  here 🙂

 

I´ve create an Actual and Plan Calculated field with something like this : 

ACTUAL = CALCULATE( SUM(DATA[MONTO]), FILTER(DATA,DATA[TIPO]="ACTUAL"))
 
I´ve also create a calculated field who pulls out the Revenue, Expenses, Salaries etc with a very similar formula, both works fine
 
I need to unify in some way both in order to find Actual_revenue, Plan_revenue without using some type of visualization filter, it´s possible?
 
Thanks a lot
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ljimenezvega84 ,

    I created a sample pbix file(see the attachment), please check if that is what you want.

    Measure = 
    VAR _actual =
        CALCULATE ( SUM ( 'Table'[Monto] ), 'Table'[Tipo] = "Actual" )
    VAR _plan =
        CALCULATE ( SUM ( 'Table'[Monto] ), 'Table'[Tipo] = "Plan" )
    RETURN
        IF ( ISINSCOPE ( 'Table'[Period] ), SUM ( 'Table'[Monto] ), _actual - _plan )
    Difference = SUMX(VALUES('Table'[Agrupacion]),[Measure])

    Best Regards

3 Replies

  • Can you provide an example to understand the request or with a pbix file?

  • Hi Kaviraj11, i can´t upload the file but my dataset is very simple just like the table below(it´s helps?)

     

    I need to be able to make a comparisson between Revenue(Actual vs Plan), Expenses(Actual vs Plan) etc.  

     

    Thanks

     

    Monto (USD)PeriodTipoAgrupacion
    $.5.000JuneActualRevenue
    $ 4.000AugustPlanRevenue
    $.5.000JuneActualExpenses
    $ 4.000AugustPlanExpenses
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi ljimenezvega84 ,

      I created a sample pbix file(see the attachment), please check if that is what you want.

      Measure = 
      VAR _actual =
          CALCULATE ( SUM ( 'Table'[Monto] ), 'Table'[Tipo] = "Actual" )
      VAR _plan =
          CALCULATE ( SUM ( 'Table'[Monto] ), 'Table'[Tipo] = "Plan" )
      RETURN
          IF ( ISINSCOPE ( 'Table'[Period] ), SUM ( 'Table'[Monto] ), _actual - _plan )
      Difference = SUMX(VALUES('Table'[Agrupacion]),[Measure])

      Best Regards