Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Saes
Helper I
Helper I

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

 

1 ACCEPTED SOLUTION

@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_)
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

8 REPLIES 8
Tahreem24
Super User
Super User

@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])))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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

@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])))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks @Tahreem24 , apologies, I think there may be some confusion. It's the Earnings Value column that I'm trying to replicate, rather than creating another column.

@Saes Yeah, I created Earning Value column and put only single value of 37.45 for first year manually. Then created that DAX on top of it. Attaching screen shot for your reference.

Capture.PNG

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks @Tahreem24 for clarifying. Is the calculated column reliant on having the Earning Value column already in place? The column I require is to calculate the Earning Value rather than duplicating an existing column. 

i.e. I know the dates, inflation figures and that the 1998 figure is $37.45 only. I need to be able to calculate the remaining figures based on this. Apologies if I've misunderstood or my post was not clear.

@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_)
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks @Tahreem24  for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.