Forum Discussion

Saes's avatar
Saes
Helper I
4 years ago
Solved

Help with building a calculated table

Hello all, I'm hoping someone can help with this issue I've been struggling with. I'm trying to build a table in PowerBI desktop that shows inflation figures and then a calculated column, which shows a value based on the annual inflation figure - see table below. 

 

I've built the first 3 columns with no problem, but struggling with the Earnings Value column.

 

The starting figure is £37.45 and that is fixed, but the other values from row 2 onwards have the inflation figure applied to it. I've tried several formulas, but cannot work out how to calculate the year-on-year increase to replicate the Earnings Value column.

 

Can anyone help?

 

September Inflation YearInflation FigureFinancial Year StartEarnings Value
1998-01/04/1999£37.45
19992.09%01/04/2000£38.23
20004.30%01/04/2001£39.88
20012.20%01/04/2002£40.75
20022.20%01/04/2003£41.65
20033.30%01/04/2004£43.03
20043.60%01/04/2005£44.57
20053.20%01/04/2006£46.00
20064.10%01/04/2007£47.89
20074.40%01/04/2008£49.99
20085.50%01/04/2009£52.74
2009-0.90%01/04/2010£52.27
20105.10%01/04/2011£54.93
20116.10%01/04/2012£58.28
20123.10%01/04/2013£60.09
20133.70%01/04/2014£62.32
20142.20%01/04/2015£63.69
2015-1.00%01/04/2016£63.05
2016-1.00%01/04/2017£62.42
2017-1.00%01/04/2018£61.79
2018-1.00%01/04/2019£61.18
20192.70%01/04/2020£62.83
20202.50%01/04/2021£64.40

 

  • Saes Try this:

    Column =
    VAR res_ = CALCULATE(((37.45*SUM(TableB[Inflation Figure])))+37.45,FILTER((TableB),TableB[September Inflation Year]<=EARLIER(TableB[September Inflation Year])))
    RETURN IF(TableB[September Inflation Year]=1998,37.45,res_)
     

8 Replies

  • Saes Try this Measure:

    Earning measure = CALCULATE(((SUM(TableB[Earning Value])*SUM(TableB[Inflation Figure])))+SUM(TableB[Earning Value]),FILTER(ALL(TableB),TableB[September Inflation Year]<=Max(TableB[September Inflation Year])))
     
    • Saes's avatar
      Saes
      Helper I

      Thanks Tahreem24 , but I require a calculated column, as it will be referenced by other data sets in the work flow.

      • Tahreem24's avatar
        Tahreem24
        Super User

        Saes  For calculated column you need to replace MAX with Earlier and remove ALL.

         

        Earning Column = CALCULATE(((SUM(TableB[Earning Value])*SUM(TableB[Inflation Figure])))+SUm(TableB[Earning Value]),FILTER((TableB),TableB[September Inflation Year]<=EARLIER(TableB[September Inflation Year])))