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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JorgeMolano
Frequent Visitor

Divide value in a period (asset depreciation)

Hello community,

 

I've been researching this topic extensively, but I haven't been able to find a solution yet.

Let's imagine I have a list of assets in a company, such as desks, laptops, chairs, and printers. Each of these assets has a replacement date and an associated replacement cost.

However, it's possible that some assets may function for longer than initially expected, meaning their expiration date extends. Therefore, I need to reserve the depreciation amount until the new expiration date of each asset.

 

Here are the tables I have in the model:

 

JorgeMolano_5-1709149248451.png

 

 

The tables Fact_Assets and Dim_Calendar are related by Fact_Assets[Expiration_Date] to Dim_Calendar[Date]. Add_years_expiation_date is a variable that will be selected through a dropdown list within the report.

 

I want to create a measure that divide the sum of "Replacement_Cost" by the value of "Years_Expiration_Extension" so that the result is displayed for each of the following years.

For example, if I have a "Replacement Cost" of 1000 in the year 2022 and the "Years of Expiration Extension" is 4, it should be displayed as follows:

 

  • 2022: 250
  • 2023: 250
  • 2024: 250
  • 2025: 250

 

JorgeMolano_7-1709149467786.png

 

 

 

I appreciate any help or suggestions you can provide. Thank you in advance!

 

 

 

 

 

 

 

 

 

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hello,

Please create these calculated column first:

 

Replacement_Cost_5 = 
VAR __year2 = 'Dim_Calendar'[Year]
VAR __year1 = 'Dim_Calendar'[Year] - 4
VAR __result = DIVIDE(SUMX(FILTER(ALL('Dim_Calendar'), 'Dim_Calendar'[Year] >= __year1 && 'Dim_Calendar'[Year] <= __year2),[Total replacement cost]),5)
RETURN
__result

 

vcgaomsft_0-1709536155254.pngand then please create a new measure:

 

Measure_rep_cost = 
SWITCH(
    SELECTEDVALUE('Add_years_expiation_date'[Year_Expiration_Extension]),
    1,SUM('Dim_Calendar'[Replacement_Cost_1]),
    2,SUM('Dim_Calendar'[Replacement_Cost_2]),
    3,SUM('Dim_Calendar'[Replacement_Cost_3]),
    4,SUM('Dim_Calendar'[Replacement_Cost_4]),
    5,SUM('Dim_Calendar'[Replacement_Cost_5])
)

 

Output:

vcgaomsft_1-1709536191631.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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