Dax Function: SLN
Category: Financial Functions
The SLN function in Power BI calculates the straight-line depreciation of an asset for one period. It is a simple financial function used to determine how much of an asset’s value is reduced evenly over its useful life.
Purpose
To calculate the periodic depreciation of an asset using the straight-line method.
Helps allocate the cost of an asset over its useful life for financial reporting or accounting.
Type of Calculations
The SLN function computes a fixed depreciation amount for each period based on the initial cost, salvage value, and useful life of the asset.
Practical Use Cases
Asset Depreciation: Calculate depreciation for machinery, vehicles, or equipment.
Budget Planning: Estimate depreciation expenses for financial forecasts.
Tax Reporting: Use straight-line depreciation for assets where it is allowed by tax regulations.
SLN(cost, salvage, life)
| Parameter | Type | Description |
|---|---|---|
cost | Scalar | The initial cost of the asset. |
salvage | Scalar | The asset’s value at the end of its useful life (salvage value). |
life | Scalar | The number of periods over which the asset is expected to be used (useful life). |
How Does SLN Dax Works
Mathematical Principle
The SLN function calculates depreciation using the formula:
Where:
Cost: The original value of the asset.
Salvage: The residual value of the asset after its useful life.
Life: The total number of periods in the asset’s useful life.
Key Points
Allocates depreciation evenly across all periods.
Assumes the asset’s value decreases linearly over time.
What Does It Return?
- Scalar Value: The straight-line depreciation amount for one period.
When Should We Use It?
Straight-Line Depreciation: When asset value reduction is uniform across its lifespan.
Financial Reporting: For assets where straight-line depreciation is the accepted accounting method.
Scenario Analysis: To compare different depreciation methods.
Examples
Basic Usage :
An asset has an initial cost of $10,000, a salvage value of $2,000, and a useful life of 8 years. Calculate the annual depreciation:
SLN(10000, 2000, 8)
Result: 1000
Column Usage
For a table of assets:
| AssetID | Cost | Salvage | Life |
|---|---|---|---|
| 1 | 15000 | 3000 | 5 |
| 2 | 8000 | 1000 | 4 |
Depreciation = SLN(Assets[Cost], Assets[Salvage], Assets[Life])
Result: Computes the straight-line depreciation for each asset.
Advanced Usage
Calculate total depreciation for all assets in a specific category:
TotalDepreciation =
SUMX(
FILTER(Assets, Assets[Category] = "Vehicles"),
SLN(Assets[Cost], Assets[Salvage], Assets[Life])
)
Result: Aggregates the depreciation for all assets in the “Vehicles” category.
Tips and Tricks
Ensure salvage value is reasonable and consistent with the asset’s expected residual value.
Use consistent time units for
life(e.g., years, months) to avoid incorrect results.Salvage value greater than the cost will result in incorrect (negative) depreciation.
Life must be a positive, non-zero number.
Performance Impact of SLN DAX Function:
Optimized for scalar calculations or small datasets.
For larger datasets, leverage calculated columns to precompute depreciation values.
Related Functions You Might Need
| Function | Description |
|---|---|
DB | Calculates depreciation using the declining balance method. |
DDB | Calculates depreciation using the double-declining balance method. |
SYD | Calculates depreciation using the sum-of-years digits method. |
RATE | Calculates the interest rate per period for an investment or loan. |
Want to Learn More?
For more information, check out the official Microsoft documentation for SLN You can also experiment with this function in your Power BI reports to explore its capabilities.
Unlock the full capabilities of Power BI and elevate your data insights with our specialized consulting services. Whether you need guidance on advanced DAX functions like those highlighted here, support in designing interactive dashboards, or expertise in optimizing data models for enhanced performance, our experienced Power BI consultants are equipped to deliver customized solutions for your business. Explore our Power BI Consulting Services page to discover how we can help your organization make smarter, data-driven decisions.
The SLN function calculates the straight-line depreciation of an asset over one period based on its cost, salvage value, and useful life.
Yes, the function can compute depreciation for assets with fractional useful life periods, provided the values are consistent.
If the salvage value is greater than the asset cost, the function will return a negative depreciation amount, which is logically incorrect.
No, the SLN function is specific to the straight-line method. For other methods, use functions like DB, DDB, or SYD.
If the salvage value is zero, the entire cost is evenly depreciated over the asset’s useful life.