{"id":89384,"date":"2021-01-04T20:11:46","date_gmt":"2021-01-04T20:11:46","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=89384"},"modified":"2024-09-03T20:15:21","modified_gmt":"2024-09-03T20:15:21","slug":"dax-financial-functions-depreciation-calculations","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/dax-financial-functions-depreciation-calculations\/","title":{"rendered":"DAX financial functions: Depreciation calculations"},"content":{"rendered":"<p><strong>The series so far:<\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/introduction-to-dax-financial-functions-part-1\/\">DAX financial functions: Loan calculations<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/dax-financial-functions-depreciation-calculations\/\">DAX financial functions: Depreciation calculations<\/a><\/li>\n<\/ol>\n\n<p>This article continues the introduction to the <strong>DAX financial functions <\/strong>begun in <strong><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/introduction-to-dax-financial-functions-part-1\/\">DAX financial functions: Loan calculations<\/a><\/strong>. As noted there, these 50-plus functions debuted around the time of the July 2020 release of Power BI Desktop; they are largely derived from those found in Excel, and so will seem familiar to many Excel users. In the <a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/introduction-to-dax-financial-functions-part-1\/\">first article<\/a>, you gained exposure to a group of related loan- \/ investment-related functions. In this article, the focus will be upon another group, <strong>Depreciation and Amortization<\/strong> functions.<\/p>\n<p>You\u2019ll be working from the hypothetical scenario presented in <strong><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/introduction-to-dax-financial-functions-part-1\/\">the first article<\/a><\/strong>: You have a client who has contacted you to ask for an introduction to the new DAX financial functions, preferring quick overviews for the most popular, based upon widespread use of their Excel counterparts. Because both you and the client have agreed that a \u201clunch-and-learn\u201d format will be most accessible to the handful of Power BI authors in their accounting and finance department, you have parceled your introductions to the functions over short sessions, each of which will group a few related functions together, with practice examples based upon a small dataset with which client attendees can follow along and create straightforward calculations with the new functions.<\/p>\n<p>The <strong>Depreciation and Amortization<\/strong> group of DAX finance functions introduced in this article are used to calculate depreciation, and they are regularly called upon in financial \/ accounting (including, of course, tax) analysis and reporting. The more common depreciation methods, for which a function is in place at this writing, are covered here, including the following (with the name of the associated method shown):<\/p>\n<ul>\n<li><strong>SLN()<\/strong> \u2013 Straight-line<\/li>\n<li><strong>SYD()<\/strong> \u2013 Sum-of-years digits<\/li>\n<li><strong>DB()<\/strong> &#8211; Fixed declining balance<\/li>\n<li><strong>DDB()<\/strong> \u2013 Double-declining balance \/ other<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"640\" class=\"wp-image-89385\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image.png\" \/><\/p>\n<p><strong>Illustration 1: The Focus in this Article: A Group of Functions Used to Calculate Depreciation \/ Amortization<\/strong><\/p>\n<p><strong>NOTE:<\/strong> Keep in mind that the DAX depreciation functions return the depreciation value for the specified period(s) only. Accumulated depreciation, net book value, and other derivative values can be easily calculated from this \u201cperiodic expense\u201d value, but require additional steps. In addition to using the DAX depreciation functions to calculate the periodic depreciation values, Power BI is an excellent tool for generating these derivative values. The values can be easily determined in conjunction with consulting GAAP (Generally Accepted Accounting Principles), your local accounting policies and local, state and Federal statutes, depending upon the immediate need(s).<\/p>\n<p>As a part of this introduction, you\u2019ll have an opportunity to examine how each function can be employed to support business requirements of the sort that your hypothetical colleagues encounter routinely, and, for the most part, accomplish with Microsoft Excel, in meeting regular business requirements. You\u2019ll learn the purpose of each function and understand the steps that each function takes in achieving the objectives of the depreciation method that it enacts, \u201cunder the covers\u201d within the function. You will then undertake a practice example with each depreciation function that demonstrates how it interacts with a small asset data set, via a calculation that you construct.<\/p>\n<p>Moreover, you will:<\/p>\n<ul>\n<li>Examine the syntax involved in exploiting the function.<\/li>\n<li>Undertake an illustrative example of the use of the function in a practice exercise.<\/li>\n<li>Briefly discuss the results you obtain via the steps of the practice example.<\/li>\n<\/ul>\n<h2>Preparation for the Practice Exercises in this Article<\/h2>\n<p>Assuming that you have installed <strong>Power BI Desktop<\/strong> (the illustrations in this article reflect the December 2020 release), you are ready to download and open the sample <strong>Power BI Desktop<\/strong> file. You will use the file for hands-on practice with the concepts introduced in the sections that follow.<\/p>\n<p><strong>NOTE:<\/strong> The latest version of Power BI is available for free download at<a href=\"http:\/\/www.powerbi.com\/\"> www.powerbi.com<\/a>.<\/p>\n<h3>Download and Open the Sample Power BI File (.pbix) for Use in this Article<\/h3>\n<p>The small <a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/12\/ST_P02_DAXFinFunc.pbix\">sample Power BI file<\/a> you\u2019ll be using contains enough imported data to support practice exercises for the functions covered in this article. You\u2019ll add the calculations and visualizations upon which the article focuses as you go. Using the sample dataset provided will ensure that the results you obtain in following the exercises&#8217; detailed steps agree to the results obtained (and depicted) as you progress through the individual sections.<\/p>\n<p>Once the sample <strong>.pbix<\/strong> file is downloaded, take the following steps to open it in <strong>Power BI Desktop<\/strong>.<\/p>\n<ol>\n<li>Open <strong>Power BI Desktop<\/strong>.<\/li>\n<li><strong>Select File &#8211; Open other reports <\/strong>from the splash dialog that appears upon entry, as shown.<\/li>\n<\/ol>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"254\" class=\"wp-image-89386\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-1.png\" \/><\/strong><\/p>\n<p><strong>Illustration 2: Select Open Other Reports on the Splash Dialog that Appears<\/strong><\/p>\n<ol start=\"3\">\n<li>Navigate to the downloaded .pbix file.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"495\" class=\"wp-image-89387\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-2.png\" \/><\/p>\n<p><strong>Illustration 3: Select the Downloaded File and Open \u2026<\/strong><\/p>\n<ol start=\"4\">\n<li>Click <em>Open<\/em>.<\/li>\n<\/ol>\n<p>The .pbix file opens, and you arrive within the <em>Report<\/em> view, which consists of a single tab containing a blank canvas. As many of you are aware, you can tell you are in the <em>Report<\/em> view because the current view (of the three views available in the upper left corner, <em>Report<\/em>, <em>Data<\/em>, and <em>Model<\/em>) is indicated by the yellow bar to the left of the icon.<\/p>\n<ol start=\"5\">\n<li>Click the <em>Data<\/em> view icon along the left of <em>Power<\/em> <em>BI Desktop<\/em> (underneath the <em>Report<\/em> view icon), as desired, to become familiar with the basic sample model, which includes three rows of asset data.<\/li>\n<\/ol>\n<p>At this point, you\u2019ll construct a table visualization to contain asset details, to which you will need to be able to easily add a depreciation calculation using a DAX financial function in the practice example for the first (<em>Straight-line<\/em>) depreciation type. This table will also serve as a model for practice examples for the subsequent depreciation functions.<\/p>\n<p><strong>Construct a Table Visualization to Contain Basic Asset Data<\/strong><\/p>\n<ol>\n<li>In the sample Power BI model, make sure to be in the <em>Report view<\/em>.<\/li>\n<li>Click the cursor in the upper half of the blank canvas.<\/li>\n<li>Click the <em>Table<\/em> icon in the collection atop the <em>Visualizations<\/em> tab, to create a blank table on the canvas.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"339\" class=\"wp-image-89388\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-3.png\" \/><\/p>\n<p><strong>Illustration 4: Create a New Table Visualization on the Canvas<\/strong><\/p>\n<ol start=\"4\">\n<li>Ensuring that the above table visualization is selected, add the following fields (from the <em>Assets<\/em> table in the <em>Fields<\/em> pane) to the <em>Values<\/em> section of the <em>Fields<\/em> tab of the <em>Visualizations<\/em> pane:\n<ul>\n<li>PurchDate<\/li>\n<li>AssetID<\/li>\n<li>AssetName<\/li>\n<li>Cost<\/li>\n<li>Salvage<\/li>\n<li>Life<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>The fields appear in the table as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"544\" class=\"wp-image-89389\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-4.png\" \/><\/p>\n<p><strong>Illustration 5: Additions in the Values Section of the Fields Tab<\/strong><\/p>\n<p>Finally, it\u2019s a good idea to label the table you\u2019re creating \u2013 as I\u2019ve said throughout my <a href=\"https:\/\/www.sqlservercentral.com\/stairways\/stairway-to-dax-and-power-bi\">Stairway to DAX and Power BI<\/a> series and elsewhere. This is a minor point, but, as multiple visualizations tend to accumulate within a development environment, it\u2019s often helpful to make them easily distinguishable via descriptive, \u201cworking\u201d titles. It\u2019s also a great way to identify the \u201cat-a-glance\u201d verification mechanism for other internal team members to use, say, in granting approval to promote a model and its contents to production from development.<\/p>\n<ol start=\"5\">\n<li>With the new table selected, once again, click the <em>Format<\/em> (\u201cpaint roller\u201d) tab, underneath the visualizations collection atop the <em>Visualizations<\/em> pane.<\/li>\n<li>Scroll down to the <em>Title<\/em> section of the <em>Format<\/em> settings.<\/li>\n<li>Click the <em>Title<\/em> slider to <em>On<\/em>.<\/li>\n<li>Expand the <em>Title<\/em> section by clicking the carat to the left of the <em>Title<\/em> label.<\/li>\n<li>Type <em>Asset Details: Straight-Line Depreciation (z_SLN)<\/em> into the <em>Title<\/em> text box.<\/li>\n<li>Set formatting as desired (you can see what I used in the illustration below).<\/li>\n<\/ol>\n<p>The settings for the <em>Title<\/em> section of the <em>Format<\/em> tab appear, alongside the new table, somewhat as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"745\" class=\"wp-image-89390\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-5.png\" \/><\/p>\n<p><strong>Illustration 6: Title Settings for the New Table<\/strong><\/p>\n<p>You now have a basic <em>Asset Depreciation<\/em> table that will serve as a template container for each DAX depreciation function introduced throughout the practice session below. This will provide a combined view of the relevant factors involved in the use of each function, as well as a comparative look at the different values the calculations generated.<\/p>\n<p>Before proceeding, you can speed preparation for the practice exercises by cloning a table similar to the one above for each of the three additional DAX depreciation functions we will be examining. The calculation set we create for every function taken up within this article (except for the <code>Straight-line Depreciation<\/code> function taken up first) generates a different depreciation value for each period, requiring a separate calculation for each period, as you\u2019ll see. But the initial table you have created contains the \u201ccommon core\u201d of all the tables created in this article. And working with a set of clones of that table will be more efficient than creating all from scratch.<\/p>\n<h3>Create a \u201cClone\u201d of the Table Visualization Created Above for Each of the Remaining DAX Depreciation Functions within the Practice Example<\/h3>\n<p>You can use a quick \u201ccopy and customize\u201d approach to create a separate table to house each of your upcoming practice examples.<\/p>\n<ol>\n<li>Click the table you created above on the canvas to select it.<\/li>\n<li>Select <strong>CTRL+C<\/strong> (\u201cCopy\u201d) to copy the existing table visualization.<\/li>\n<li>Click outside the table and onto the blank canvas.<\/li>\n<li>Select <strong>CTRL + V<\/strong> (\u201cPaste\u201d) on the keyboard to create an identical copy of the table you just created.<\/li>\n<li>Repeat <strong>Steps 3<\/strong> and <strong>4<\/strong> above two more times, for a total of three times, to create three copies of the same table.<\/li>\n<\/ol>\n<p>You now have four identical copies of the original table visualization.<\/p>\n<ol start=\"6\">\n<li>Turn on <em>Gridlines<\/em> (under the <em>View<\/em> tab on the main menu) if you find it useful in arranging visualizations.<\/li>\n<li>Move the newly created (at this point identical) copies to align them evenly, below the original, on the canvas, to create working space, approximately as shown.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"964\" class=\"wp-image-89391\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-6.png\" \/><\/p>\n<p><strong>Illustration 7: \u201cFour Tables for Four Practice Sets:\u201d Copies below the Original \u2026<\/strong><\/p>\n<p>Now, all that remains is to customize each of the templates you have cloned so that the DAX depreciation function to be demonstrated in each is reflected in its title. The good news is that the existing title is already formatted, and needs only a modification in the description of the function it will contain, as you\u2019ll see in the next steps.<\/p>\n<ol>\n<li>With the second table from the top selected, click the <em>Format<\/em> tab, once again, underneath the visualizations collection atop the <em>Visualizations<\/em> pane.<\/li>\n<li>Scroll down to the <em>Title<\/em> section of the <em>Format<\/em> settings, as you did earlier with the original table visualization created.<\/li>\n<li>Expand the <em>Title<\/em> section by clicking the carat to the left of <em>Title<\/em> label, if necessary.<\/li>\n<li>Change the <code>Title<\/code> from <em>Asset Details: Straight-Line Depreciation (z_SLN)<\/em> to <em>Asset Details: Sum-of-years Digits Depreciation (z_SYD)<\/em>.<\/li>\n<li>Leave formatting and other settings within the <em>Title<\/em> section as they were set in the original.<\/li>\n<\/ol>\n<p>The second clone table now appears, above the original table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"312\" class=\"wp-image-89392\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-7.png\" \/><\/p>\n<p><strong>Illustration 8: The Second Clone Becomes the SYD Calculations Table \u2026<\/strong><\/p>\n<p>You\u2019ll next customize a table to house the <em>Fixed Declining Balance<\/em> calculation you will craft.<\/p>\n<ol>\n<li>With the third table from the top selected, click the <em>Format<\/em> tab, once again, underneath the visualizations collection atop the <em>Visualizations<\/em> pane.<\/li>\n<li>Scroll down to the <em>Title<\/em> section of the <em>Format<\/em> settings, as you did within each of the earlier two table visualizations.<\/li>\n<li>Expand the <em>Title<\/em> section by clicking the carat to the left of <em>Title<\/em> label, as required.<\/li>\n<li>Change the <em>Title<\/em> from <em>Asset Details: Straight-Line Depreciation (z_SLN)<\/em> to <em>Asset Details: Fixed Declining Balance Depreciation (z_DB)<\/em>.<\/li>\n<li>Leave formatting and other settings within the <em>Title<\/em> section as set in the original.<\/li>\n<\/ol>\n<p>The third clone table now appears, above the original table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"457\" class=\"wp-image-89393\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-8.png\" \/><\/p>\n<p><strong>Illustration 9: The Third Clone Becomes the DB Calculations Table \u2026<\/strong><\/p>\n<p>Finally, you\u2019ll create a table to house the <em>Double-Declining Balance<\/em> calculation you will write.<\/p>\n<ol>\n<li>With the fourth table from the top selected, click the <em>Format<\/em> tab, as before, underneath the visualizations collection atop the <em>Visualizations<\/em> pane.<\/li>\n<li>Scroll down to the <em>Title<\/em> section of the <em>Format<\/em> settings, as you did within each of the earlier three table visualizations.<\/li>\n<li>Expand the <em>Title<\/em> section by clicking the carat to the left of <em>Title<\/em> label, as needed.<\/li>\n<li>Change the <em>Title<\/em> from <em>Asset Details: Straight-Line Depreciation (z_SLN)<\/em> to <em>Asset Details: Double-Declining Balance Depreciation (z_DDB)<\/em>.<\/li>\n<li>Leave formatting and other settings within the <em>Title<\/em> section as set in the original.<\/li>\n<\/ol>\n<p>The fourth clone table now appears, above the original table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"629\" class=\"wp-image-89394\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-9.png\" \/><\/p>\n<p><strong>Illustration 10: The Fourth Clone Becomes the DDB Calculations Table \u2026<\/strong><\/p>\n<p>You\u2019re now ready to begin putting the DAX depreciation functions to work within the practice steps for each below.<\/p>\n<h2>Shared Parameters for DAX Financial Functions for Depreciation<\/h2>\n<p>The financial functions introduced in this article all share the same objective: To support the computation of depreciation. While the accounting rules \/ assumptions contained within each function differ, they largely draw upon the same arguments \/ parameters as a basis upon which to apply their respective rules and calculate depreciation.<\/p>\n<p>To gain an introduction to the operation of the functions efficiently, you\u2019ll work through a separate practice exercise for each. Because the basic arguments share three common arguments, it makes sense to explain the shared arguments \/ parameters here, so as not to repeat them in the <em>Syntax<\/em> section of each function. Should you need to refresh your understanding of any given argument&#8217;s meaning, you need only refer to the below.<\/p>\n<p>The shared arguments \/ parameters are:<\/p>\n<ul>\n<li><strong>Cost<\/strong> \u2013 The initial cost of the asset. From a capitalization perspective,<strong> Cost<\/strong> typically includes purchase price, together with transportation \/ shipping, setup and preparation costs, taxes, etc. What can be included depends upon accounting \/ tax statutes, policies and procedures in effect for the owner.<\/li>\n<\/ul>\n<ul>\n<li><strong>Salvage<\/strong> \u2013 The value at the end of the depreciation. Also known as the \u201csalvage value\u201d of the asset, this takes into account what the asset, at the end of its economic life, might still be worth, or sold \/ exchanged for.<\/li>\n<\/ul>\n<p>Example: A truck that was initially put on a company\u2019s books at $22,000, has reached the end of its economic life after five years, based upon organizational accounting and tax policy. At this time, the vehicle is determined to have a \u201cblue book\u201d \/ market value of $600, which might be described as the \u201cremaining,\u201d or \u201csalvage\u201d value.<\/p>\n<ul>\n<li><strong>Life <\/strong>\u2013 The number of periods over which the asset is depreciated (sometimes called the \u201ceconomic\u201d or \u201cuseful\u201d life of the asset).<\/li>\n<\/ul>\n<p>You\u2019ll work with the individual functions in the sections that follow.<\/p>\n<h2>DAX Financial Function: SLN()<\/h2>\n<p>According to the <em>Data<\/em> <em>Analysis Expressions (DAX) Reference<\/em>, the <code>SLN()<\/code> function \u201creturns the straight-line depreciation of an asset for one period.\u201d<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Depreciation#Straight-line_depreciation\" target=\"_blank\" rel=\"noopener\">Straight line depreciation<\/a>\u00a0is the simplest way of calculating the\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Depreciation\" target=\"_blank\" rel=\"noopener\">depreciation<\/a>\u00a0of an asset. The depreciation amount is the same (hence \u201cstraight-line) over each period of the asset\u2019s life. <code>SLN()<\/code> returns the periodic depreciation allowance based upon the values you supply it.<\/p>\n<p>Example: The truck mentioned earlier, put on a company\u2019s books at $22,000, with a salvage value of $600 and a life of five years, would generate annual depreciation of $ 4,280 via the straight-line method. The <code>SLN()<\/code> function would calculate depreciation via the following logic:<\/p>\n<p><strong>Straight Line Depreciation =\u00a0<\/strong>(Cost \u2013 Salvage) \/ Life = $ 21,400 \/ 5 yr. = $4,280 per year<\/p>\n<h3>Syntax<\/h3>\n<p>Syntactically, the parameters \/ arguments you provide are specified within the parentheses to the right of <em>SLN()<\/em> as shown:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">SLN(&lt;cost&gt;, &lt;salvage&gt;, &lt;life&gt;)<\/pre>\n<p>The parameters are explained in the section named <em>Shared Parameters for DAX Financial Functions for Depreciation<\/em> above.<\/p>\n<h3>Return Value and Further Remarks<\/h3>\n<p><code>SLN()<\/code> returns the straight-line depreciation for one period. Periodicity assumed within (and built into) the calculation, therefore, determines the periodicity of the output.<\/p>\n<p>You\u2019ll get some hands-on practice with\u00a0<code>SLN()<\/code>\u00a0in Power BI Desktop in the next section.<\/p>\n<h3>Practice<\/h3>\n<p>The operation of <code>SLN()<\/code> will become clear using the data contained in the Power BI model you have downloaded and prepared above. You\u2019ll begin with the dataset that appears in the model, and create a calculation that employs <code>SLN()<\/code>, whose parameters are selected from the assets data in the table provided. Along with the other functions you examine in this article, the \u201canswer\u201d to be expected via the calculation you create will appear in the associated practice step of this section for easy comparison.<\/p>\n<h4>Employ the DAX <strong>SLN()<\/strong> Function to Generate Basic Periodic Depreciation Value<\/h4>\n<p>You can take the following steps to create a calculation to return basic periodic depreciation values within the sample dataset.<\/p>\n<ol>\n<li>From the <em>Report<\/em> view, right-click the <em>Assets<\/em> table in the <em>Fields<\/em> pane of the model.<\/li>\n<li>Select <em>New column<\/em> from the context menu that appears, as depicted.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"277\" height=\"750\" class=\"wp-image-89395\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-10.png\" \/><\/p>\n<p><strong>Illustration 11: Creating a New Calculation \u2026<\/strong><\/p>\n<ol start=\"3\">\n<li>Type, or cut and paste, the following into the <em>Formula<\/em> bar:<\/li>\n<\/ol>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">z_SLN = \r\nSLN(\r\n   Assets[Cost], \r\n      Assets[Salvage], \r\n   Assets[Life]\r\n)<\/pre>\n<p>The calculation appears as shown in the <em>Formula<\/em> bar:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"408\" class=\"wp-image-89396\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-11.png\" \/><\/p>\n<p><strong>Illustration 12: Calculation Containing the SLN() Function \u2026<\/strong><\/p>\n<ol start=\"4\">\n<li>Click the checkmark to the left of the <code>Formula<\/code> bar to check and commit the calculation, and to create the new calculated column.<\/li>\n<\/ol>\n<p>The calculation <em>z_SLN<\/em> appears within the <em>Assets<\/em> table in the <em>Fields<\/em> pane.<\/p>\n<p><strong>NOTE:<\/strong> You will name the calculations you create in this article with a <em><strong>z_<\/strong><\/em>\u00a0prefix. This leaves their names very close to that of the DAX financial function they employ, while making them easily identifiable (via a separate physical grouping) from the base model columns. Other methods of grouping calculations are, of course, available.<\/p>\n<ol start=\"5\">\n<li>With the new calculated column <em>z_SLN<\/em> selected in the <em>Fields<\/em> pane, make the following <em>Format<\/em> settings underneath the main menu:\n<ul>\n<li>Currency ($)<\/li>\n<li>2 decimal places<\/li>\n<li>Don\u2019t summarize<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"83\" class=\"wp-image-89397\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-12.png\" \/><\/p>\n<p><strong>Illustration 13: Calculated Column Format Settings<\/strong><\/p>\n<ol start=\"6\">\n<li>Select the <em>Asset Details: Straight-Line Depreciation (z_SLN)<\/em> table visualization, once again, and then click the checkbox to the left of the new <em>z_SLN<\/em> calculation. To add it to the <em>Values<\/em> section of the <em>Fields<\/em> tab for the table, underneath the existing <em>Life<\/em> column.<\/li>\n<\/ol>\n<p>The <em>z_SLN<\/em> value within the <code>Loan Details<\/code> table visualization appears as shown. This can serve as a means of checking the output accuracy of the new calculation within your own Power BI Desktop model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"563\" class=\"wp-image-89398\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-13.png\" \/><\/p>\n<p><strong>Illustration 14: Straight-line Depreciation Value Returned via the New Calculation<\/strong><\/p>\n<p>If you\u2019ve obtained similar results to the above, you can conclude that you\u2019ve successfully assembled a calculation to demonstrate the operation of the DAX <code>SLN()<\/code> financial function.<\/p>\n<p>Straight-line depreciation makes sense to even non-accountants, assuming the concept of depreciation itself, etc., does not present an obstacle. The remaining modes of depreciation, three functions for which we will consider in the following sections, manipulate (for accounting and tax, as well as other reasons) the depreciation charged per period. This manipulation typically is driven by a need \/ option to accelerate depreciation or influence the rate at which the depreciation is charged \u2013 often resulting from tax considerations. A light overview of each method will be included in the discussion of each, but abundant information is available online, at the IRS and state taxing authority sites, etc., if this is of interest.<\/p>\n<p><strong>NOTE:<\/strong> As a tip, you may find it convenient to move the other three practice calculation tables to the left of the \u201ctable in play,\u201d while working with any given depreciation calculation in this article \u2013 something like the arrangement shown below. You can always move things around to match what you see in the working illustrations at any given point in the practice steps.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"477\" class=\"wp-image-89399\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-14.png\" \/><\/p>\n<p><strong>Illustration 15: Suggested Arrangement of Working vs. Non-Working Tables in Sample Practice Exercise<\/strong><\/p>\n<p>Keep in mind, as you lay out your tables, that all except the first table (housing <code>SLN()<\/code> function) will have multiple additional columns, as the respective period calculation will generate a separate value, hence column, for each of the five years presented in the corresponding table visualization.<\/p>\n<p>In the next section, you\u2019ll be introduced to the DAX <code>SYD()<\/code> depreciation function.<\/p>\n<h2>DAX Financial Function: SYD()<\/h2>\n<p>According to the <em>Data<\/em> <em>Analysis Expressions (DAX) Reference<\/em>, the <code>SYD()<\/code> function \u201creturns the sum-of-years&#8217; digits depreciation of an asset for a specified period.\u201d <code>SYD()<\/code> is a popular accelerated depreciation function, providing support for reducing the calculated value of an asset by a larger amount during the first period of its lifetime, and successively smaller amounts during subsequent periods.<\/p>\n<h3>Sum-of-years&#8217; Digits Method: The Concepts<\/h3>\n<p>The sum-of-years&#8217; digits depreciation technique accelerates depreciation based upon the assumption that assets are generally more productive when they are new, and that their productivity (and hence economic value) decreases as they become old. An example will likely help illustrate the mechanical steps behind the technique:<\/p>\n<p>Example: The truck mentioned earlier, put on a company\u2019s books at $22,000, with a salvage value of $600 and a life of five years, would have generated annual depreciation of $ 4,280 via the straight-line method.<\/p>\n<p>The <code>SYD()<\/code> function would calculate depreciation via the following logic:<\/p>\n<ol>\n<li><strong>Determine the years\u2019 digits value:<\/strong> Since the asset has a useful life of <em>5 years<\/em>, the years&#8217; digits are: <em>5, 4, 3, 2,<\/em> and <code>1<\/code>. The sum of the digits is <code><em>5+4+3+2+1=15<\/em><\/code>.<\/li>\n<\/ol>\n<p><strong>NOTE:<\/strong> The sum of the digits can also be determined by using the formula <code>(n2+n)\/2<\/code> where <code>n<\/code> is equal to the useful life of the asset in years. The example would be shown as <code>(52+5)\/2=15<\/code><\/p>\n<ol start=\"2\">\n<li><strong>Depreciable base = Cost \u2212 Salvage value<\/strong><\/li>\n<li><strong>SYD depreciation =\u00a0<\/strong><strong>Depreciable base x (Remaining useful life \/ Sum of the years&#8217; digits)<\/strong><\/li>\n<li><strong>Calculate depreciation rates for each period of life<\/strong>:<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>5\/15 for the 1st year<\/li>\n<li>4\/15 for the 2nd year<\/li>\n<li>3\/15 for the 3rd year<\/li>\n<li>2\/15 for the 4th year<\/li>\n<li>1\/15 for the 5th year<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>Depreciation expense<\/strong> by respective period (year) would be generated as follows:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Period (Year)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciable Base<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Rate<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Expense<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>$ 21,400<\/p>\n<\/td>\n<td>\n<p>5\/15<\/p>\n<\/td>\n<td>\n<p>$ 7,133.33<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>$ 21,400<\/p>\n<\/td>\n<td>\n<p>4\/15<\/p>\n<\/td>\n<td>\n<p>$ 5,706.67<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>$ 21,400<\/p>\n<\/td>\n<td>\n<p>3\/15<\/p>\n<\/td>\n<td>\n<p>$ 4,280.00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>$ 21,400<\/p>\n<\/td>\n<td>\n<p>2\/15<\/p>\n<\/td>\n<td>\n<p>$ 2,853.33<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5<\/p>\n<\/td>\n<td>\n<p>$ 21,400<\/p>\n<\/td>\n<td>\n<p>1\/15<\/p>\n<\/td>\n<td>\n<p>$ 1,426.67<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Total<\/strong><\/p>\n<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>\n<p><strong>$21,400.00<\/strong><\/p>\n<p><strong>( $ 600 scrap value remains)<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 1: Depreciation by Period via the Sum-of-years&#8217; Digits Method<\/strong><\/p>\n<p>The point here is to illustrate what goes <em>on behind the scenes<\/em> when you use the DAX <code>SYD()<\/code> function. Understanding the mechanics can make it easier to intelligently select and use the function as required in the business environment, particularly when you identify the method from an examination of existing depreciation reports, built within, say, MS Excel, where the function is very similar.<\/p>\n<h3>Syntax<\/h3>\n<p>Syntactically, the parameters \/ arguments you provide are specified within the parentheses to the right of <code>SYD()<\/code> as shown:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">SYD(&lt;cost&gt;, &lt;salvage&gt;, &lt;life&gt;, &lt;per&gt;)<\/pre>\n<p>The arguments common to the DAX depreciation functions as a group are explained in the section named <em>Shared Parameters for DAX Financial Functions for Depreciation<\/em> above. The <code>Per<\/code> parameter, relevant to this function, does not occur in all DAX depreciation functions.<\/p>\n<p><strong>Per<\/strong> \u2013 The period for which you wish to calculate depreciation. Must use the same units as<strong> Life<\/strong>, with a value between 1 and<strong> Life<\/strong> (inclusive).<\/p>\n<h3>Return Value and Further Remarks<\/h3>\n<p>The DAX <code>SYD()<\/code> function returns the <em>Sum-of-years&#8217; digits<\/em> depreciation for the specified period. Periodicity assumed in the calculation therefore determines periodicity of the output.<\/p>\n<p>You\u2019ll get some hands-on practice with\u00a0<code>SYD()<\/code>\u00a0in Power BI Desktop in the next section.<\/p>\n<h3>Practice<\/h3>\n<p>The operation of <code>SYD()<\/code> will become clear using the data contained in the Power BI model you have downloaded and prepared above. You\u2019ll begin with the dataset that appears in the model, once again, and create calculations that employ <code>SYD()<\/code>, whose parameters are selected from the assets data in the table provided. Along with the other functions you examine in this article, the \u201canswer\u201d to be expected via the calculations you create will appear in the associated practice step of this section for easy comparison.<\/p>\n<h4>Employ the DAX <strong>SYD()<\/strong> Function to Generate Sum-of-years\u2019 Digits Depreciation Values<\/h4>\n<p>You can take the following steps to create a calculation to generate <em>Sum-of-years\u2019 Digits<\/em> depreciation values for each of the years of the lives of the assets in the practice data set.<\/p>\n<p><em>Create Five Separate <\/em><code>SYD()<\/code><em> Calculations, One for Each Year of Asset Life<\/em><\/p>\n<ol>\n<li>From the <em>Report<\/em> view, right-click the <em>Assets<\/em> table in the <em>Fields<\/em> pane of the model.<\/li>\n<li>Selecting <em>New column<\/em> from the context menu that appears, as you did within the earlier calculation, and following the steps you took in creating a calculation there, create the following five calculations within the <em>Assets<\/em> table of the model:<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>\n<p>Calculation Name<\/p>\n<\/td>\n<td>\n<p>Calculation Syntax<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_SYD-2017<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_SYD-2017 =   <\/code><\/p>\n<p><code>   SYD(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],1<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_SYD-2018<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_SYD-2018 =   <\/code><\/p>\n<p><code>   SYD(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],2<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_SYD-2019<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_SYD-2019 =   <\/code><\/p>\n<p><code>   SYD(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],3<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_SYD-2020<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_SYD-2020 =   <\/code><\/p>\n<p><code>   SYD(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],4<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_SYD-2021<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_SYD-2021 =   <\/code><\/p>\n<p><code>   SYD(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],5<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 2: Sum-of-years&#8217; Digits Method Calculations to Add to the Assets Table<\/strong><\/p>\n<p>The calculations appear in the <em>Fields<\/em> pane, <em>Assets<\/em> table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"728\" class=\"wp-image-89400\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-15.png\" \/><\/p>\n<p><strong>Illustration 16: z_SYD Calculations in the Fields Pane<\/strong><\/p>\n<p><strong>NOTE:<\/strong> Approaches vary, of course, for grouping calculations and, in the business environment, placing them in a folder, etc., might have organizational advantages. For purposes of this set of practice exercises, however, you\u2019ll keep them in simple groups via the <code><em>z_<\/em><\/code> prefix as shown.<\/p>\n<ol start=\"3\">\n<li>For each new calculated column in the <em>z_SYD<\/em> group, select the calculation and make the following <em>Format<\/em> settings (<em>Column tools<\/em> menu):\n<ul>\n<li>Currency ($)<\/li>\n<li>2 decimal places<\/li>\n<li>Don\u2019t summarize<\/li>\n<li style=\"list-style-type: none;\">\u00a0<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"93\" class=\"wp-image-89401\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-16.png\" \/><\/p>\n<p><strong>Illustration 17: Example z_SYD Member Calculated Column Format Settings (Column Tools)<\/strong><\/p>\n<ol start=\"4\">\n<li>Ensuring that the <em>Asset Details: Sum-of-years Digits Depreciation (z_SYD)<\/em> table visualization is selected, add the new <em>z_SYD<\/em> calculations to the <em>Values<\/em> section of the <em>Fields<\/em> tab for the table, underneath the existing <em>Life<\/em> column.<\/li>\n<\/ol>\n<p>The five, newly added <em>z_SYD<\/em> values, each generating the depreciation charged to the respective period year, appear within the <em>Asset Details: Sum-of-years Digits Depreciation (z_SYD)<\/em> table visualization as shown. This can serve as a means of checking the output accuracy of the new calculation within your own Power BI Desktop model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"429\" class=\"wp-image-89402\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-17.png\" \/><\/p>\n<p><strong>Illustration 18: SYD Depreciation Value for Respective Year Returned via the New Calculations<\/strong><\/p>\n<p>Once again, if you\u2019ve obtained similar results to the above, you can conclude that you\u2019ve successfully assembled the calculations to demonstrate the operation of the DAX <em>SYD()<\/em> financial function over the lives of assets with the characteristics described in the data.<\/p>\n<p>In the next section, you\u2019ll be introduced to the DAX <code>DB()<\/code> depreciation function.<\/p>\n<h2>DAX Financial Function: DB()<\/h2>\n<p>According to the <em>Data<\/em> <em>Analysis Expressions (DAX) Reference<\/em>, the <code>DB()<\/code> function \u201creturns the depreciation of an asset for a specified period using the fixed-declining balance method.\u201d <code>DB()<\/code> is another popular accelerated depreciation function, providing support, once again, for reducing the calculated value of an asset by a larger amount during the first period of its lifetime, and smaller amounts during subsequent periods.<\/p>\n<h3>Fixed Declining Balance Method: The Concepts<\/h3>\n<p>The <em>Fixed Declining Balance<\/em> depreciation technique, like the <em>Sum-of-years Digits<\/em> (<code>SYD()<\/code> ) function I introduced in the section immediately previous, assumes that assets are generally more productive when they are new and their productivity \/ economic value decreases as they become old. An example, once again, may help illustrate the mechanics for the <em>Fixed Declining Balance<\/em> technique:<\/p>\n<p>Example: The truck mentioned earlier, put on a company\u2019s books at $22,000, with a salvage value of $600 and a life of five years, would have generated annual depreciation of $ 4,280 via the straight-line method.<\/p>\n<p>The <code>DB()<\/code> function would calculate depreciation via the following logic:<\/p>\n<ol>\n<li><strong>Depreciable Base = Cost \u2013 Accumulated Depreciation <\/strong> Deduct the <em>Depreciation Expense<\/em> taken to date, from the beginning cost of the asset (in this case, do not deduct <em>Salvage Value<\/em>, which is taken into consideration within the <em>Depreciation Rate<\/em>).<\/li>\n<li><strong>Depreciation Rate = 1\u2212 ((Salvage \/ Cost) <sup>(1 \/ Life) <\/sup> <\/strong>(Rounded to three decimal places within the DB() function, and fairly common within accounting and finance references). This rate remains the same for each year of asset life within the <em>Fixed Declining Balance<\/em> depreciation technique, with special case consideration for first and last periods where the first period is not a full twelve months. For more information, see the <a href=\"https:\/\/docs.microsoft.com\/en-us\/dax\/db-function-dax\"><em>Data<\/em> <em>Analysis Expressions (DAX) Reference<\/em> for the <strong>DB() <\/strong>function<\/a>.<\/li>\n<\/ol>\n<p><strong>Depreciation expense<\/strong> for the cited example, by respective period (year), would be generated as follows:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Period (Year)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciable Base<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Rate<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Expense<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>$ 22,000.00<\/p>\n<\/td>\n<td>\n<p>0.513<\/p>\n<\/td>\n<td>\n<p>$ 11,286.00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>$ 10,714.00<\/p>\n<\/td>\n<td>\n<p>0.513<\/p>\n<\/td>\n<td>\n<p>$ 5,496.28<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>$ 5,217.72<\/p>\n<\/td>\n<td>\n<p>0.513<\/p>\n<\/td>\n<td>\n<p>$ 2,676.69<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>$ 2,541.03<\/p>\n<\/td>\n<td>\n<p>0.513<\/p>\n<\/td>\n<td>\n<p>$ 1,305.55<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5<\/p>\n<\/td>\n<td>\n<p>$ 1,237.48<\/p>\n<\/td>\n<td>\n<p>0.513<\/p>\n<\/td>\n<td>\n<p>$ 634.83<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Total<\/strong><\/p>\n<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>\n<p><strong>$21,400.00<\/strong><\/p>\n<p><strong>( $ 600 scrap value remains, plus small rounding difference)<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 3: Depreciation by Period via the Fixed Declining Balance Method<\/strong><\/p>\n<p>Once again, the idea is to illustrate what transpires within the DAX <em>DB()<\/em> function. In most cases, the business environment will stipulate, via accounting \/ finance \/ tax considerations the depreciation policies \u2013 and hence the specific method that will drive the DAX function you select for a given task. However, it certainly helps to understand what is going on \u201cunder the covers\u201d in cases when, say, a Power BI visualization is returning unexpected results.<\/p>\n<h3>Syntax<\/h3>\n<p>Syntactically, the parameters \/ arguments you provide are specified within the parentheses to the right of <code>DB()<\/code> as shown:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">DB(&lt;cost&gt;, &lt;salvage&gt;, &lt;life&gt;, &lt;period&gt;[, &lt;month&gt;])<\/pre>\n<p>As you\u2019ve already discovered, the arguments common to the DAX depreciation functions as a group are explained in the section named <em>Shared Parameters for DAX Financial Functions for Depreciation<\/em> above. The <code>Period<\/code> and <code>Month<\/code> (where applicable) parameters, relevant to this function, do not occur in all DAX depreciation functions.<\/p>\n<p><strong>Period<\/strong> \u2013 The period for which you wish to calculate depreciation. It must use the same units as<strong> Life<\/strong>, with a value between 1 and<strong> Life<\/strong> (inclusive).<\/p>\n<p><strong>Month<\/strong> \u2013 (Optional) The number of months in the first year. If the month is omitted, it is assumed to be 12.<\/p>\n<p><strong>Return Value and Further Remarks<\/strong><\/p>\n<p>The DAX <strong>DB()<\/strong> function returns the <strong>Fixed Declining Balance<\/strong> depreciation for the specified period.<\/p>\n<p>You\u2019ll get some hands-on practice with\u00a0<strong>DB()<\/strong>\u00a0in Power BI Desktop in the next section.<\/p>\n<h3>Practice<\/h3>\n<p>As with the earlier depreciation functions in the previous exercises, operation of <code>DB()<\/code> will become clear using the data contained in the Power BI model you have downloaded and prepared above. You\u2019ll begin with the dataset that appears in the model, once again, and create calculations that employ <code>DB()<\/code>, whose parameters are selected from the assets data in the table provided. Along with the other functions you examine in this article, the \u201canswer\u201d to be expected via each calculation you create will appear in the associated practice step of this section for easy comparison.<\/p>\n<h4>Employ the DAX <strong>DB() <\/strong>Function to Generate Fixed Declining Balance Depreciation Values<\/h4>\n<p>You can take the following steps to create a calculation to generate <em>Fixed Declining Balance<\/em> depreciation values for each of the years of the lives of the assets in the practice data set.<\/p>\n<p><em>Create Five Separate DB() Calculations, One for Each Year of Asset Life<\/em><\/p>\n<ol>\n<li>From the <em>Report<\/em> view, right-click the <em>Assets<\/em> table in the <em>Fields<\/em> pane of the model.<\/li>\n<li>Selecting <em>New column<\/em> from the context menu that appears, as you did within the calculations created for earlier practice exercise steps of this article, and following the steps you took in creating a calculation there, create the following five calculations within the <em>Assets<\/em> table of the model:<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>\n<p>Calculation Name<\/p>\n<\/td>\n<td>\n<p>Calculation Syntax<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DB-2017<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DB-2017 = <\/code><\/p>\n<p><code>   DB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],1<\/code><\/p>\n<p><code> )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DB-2018<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DB-2018 = <\/code><\/p>\n<p><code>   DB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],2<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_ DB-2019<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DB-2019 = <\/code><\/p>\n<p><code>   DB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],3<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_ DB-2020<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DB-2020 = <\/code><\/p>\n<p><code>   DB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],4<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_ DB-2021<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DB-2021 = <\/code><\/p>\n<p><code>   DB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],5<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 4: Fixed Declining Balance Method Calculations to Add to the Assets Table<\/strong><\/p>\n<p>The calculations appear in the <em>Fields<\/em> pane, <em>Assets<\/em> table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"156\" height=\"480\" class=\"wp-image-89403\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-18.png\" \/><\/p>\n<p><strong>Illustration 19: z_DB Calculations in the Fields Pane<\/strong><\/p>\n<ol start=\"3\">\n<li>For each new calculated column in the <em>z_DB<\/em> group, select the calculation and make the following <em>Format<\/em> settings (<em>Column<\/em> <em>tools<\/em> menu), as done with calculations in previous sections.\n<ul>\n<li>Currency ($)<\/li>\n<li>2 decimal places<\/li>\n<li>Don\u2019t summarize<\/li>\n<\/ul>\n<\/li>\n<li>Ensuring that the <em>Asset Details: Fixed Declining Balance Depreciation (z_DB)<\/em> table visualization is selected, add the new <em>z_DB<\/em> calculations to the <em>Values<\/em> section of the <em>Fields<\/em> tab for the table, underneath the existing <em>Life<\/em> column.<\/li>\n<\/ol>\n<p>The five, newly added <em>z_DB<\/em> values, each generating the depreciation charged to the respective period year, appear within the <em>Asset Details: Fixed Declining Balance Depreciation (z_DB) <\/em>table visualization as shown. This can serve as a means of checking the output accuracy of the new calculation within your own Power BI Desktop model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"511\" class=\"wp-image-89404\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-19.png\" \/><\/p>\n<p><strong>Illustration 20: DB() Depreciation Value for Respective Year Returned via the New Calculations<\/strong><\/p>\n<p>If you\u2019ve obtained similar results to the above, you can conclude that you\u2019ve successfully assembled the calculations to demonstrate the operation of the DAX <code>DB()<\/code> financial function over the lives of assets with the characteristics described in the data.<\/p>\n<p>In the next section, you\u2019ll be introduced to the DAX <em>DDB()<\/em> depreciation function.<\/p>\n<h2>DAX Financial Function: DDB()<\/h2>\n<p>According to the <em>Data<\/em> <em>Analysis Expressions (DAX) Reference<\/em>, the <code>DDB()<\/code> function \u201creturns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.\u201d <code> DDB()<\/code> is yet another depreciation function that provides support for reducing the calculated value of an asset is by a larger amount during the first period of its lifetime, and smaller amounts during subsequent periods.<\/p>\n<h3>Double Declining Balance Method: The Concepts<\/h3>\n<p>The <em>Double Declining Balance<\/em> depreciation technique shares a basic concept with other accelerated depreciation techniques &#8211; like the <em>Sum-of-years Digits<\/em> (<code>SYD()<\/code>) and the <em>Fixed Declining Balance<\/em> (<code>DB()<\/code>) financial functions I introduced in the earlier sections: The <em>Double Declining Balance<\/em> technique assumes higher productivity in newer assets, and waning productivity \/ economic value as assets age.<\/p>\n<p>The <em>Double Declining Balance<\/em> technique, in the simplest scenario, doubles the Straight-line rate and multiples it times the book value (<em>Cost \u2013 Accumulated Depreciation<\/em>) at the beginning of the respective period.<\/p>\n<p>There are a couple of twists that you might not expect with the <em>Double Declining Balance<\/em> depreciation technique \u2013 factors that reflect the traditional technique as consistently practiced within the accounting \/ finance context and which are reflected within the DAX <code>DDB()<\/code> financial function:<\/p>\n<ul>\n<li>The first thing that has confused some early adopters is a matter of the naming of the method: They have assumed, from the outset that \u201cDouble Declining Balance\u201d simply means \u201ctwo times the period depreciation generated by the Fixed Declining Balance method. This assumption reveals itself to be faulty early in the attempt to apply it in an understanding of the <em>Double Declining Balance<\/em> technique, but it might save some time to learn about the actual workings of the technique before getting started with a partial understanding.<\/li>\n<li>The <em>Double Declining Balance<\/em> calculation does not consider the salvage value in the depreciation of each period. Where book value falls below the salvage value, the last period would likely be adjusted so that it ends at the salvage value. This might need to be taken into consideration if you are, say, constructing a visualization \/ report involving the <em>DDB()<\/em> function, and are expecting the total of the depreciation expenses over the periods of the life of the asset to net out to precisely the economic value (cost-less-salvage value) at the end of the asset life. While a simple plug could be constructed in Power BI \/ other reporting mechanisms, it would be best to consult accounting \/ finance on the best way to handle this in your own environment. (A variable declining balance approach might be an alternative option.)<\/li>\n<\/ul>\n<p>An example may help illustrate the mechanics for the <em>Double Declining Balance<\/em> technique:<\/p>\n<p>Example: The truck mentioned earlier, put on a company\u2019s books at $22,000, with a salvage value of $600 and a life of five years, would have generated annual depreciation of $ 4,280 via the straight-line method.<\/p>\n<p>The <code>DDB()<\/code> function would calculate depreciation via the following logic:<\/p>\n<ol>\n<li><strong>Straight-Line Depreciation Percent = 100 % \/ Economic Life\u00a0<\/strong>Simply generate an annual depreciation percent.<\/li>\n<li><strong>Depreciation Rate = 2 x Straight-Line Depreciation Percent\u00a0<\/strong>The \u201cdouble\u201d in \u201c<strong>Double-Declining Balance<\/strong>\u201d<\/li>\n<li><strong>Depreciation for a Period = Depreciation Rate x Depreciable Base at Beginning of the Period\u00a0<\/strong><em>Depreciation expense<\/em> for the cited example, by respective period (year), would be generated as follows:<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Period (Year)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciable Base<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Rate<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Depreciation Expense<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>$ 22,000.00<\/p>\n<\/td>\n<td>\n<p>.400<\/p>\n<\/td>\n<td>\n<p>$ 8,800.00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>$ 13,200.00<\/p>\n<\/td>\n<td>\n<p>.400<\/p>\n<\/td>\n<td>\n<p>$ 5,280.00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>$ 7,920.00<\/p>\n<\/td>\n<td>\n<p>.400<\/p>\n<\/td>\n<td>\n<p>$ 3,168.00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>$ 4,752.00<\/p>\n<\/td>\n<td>\n<p>.400<\/p>\n<\/td>\n<td>\n<p>$ 1,900.80<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5<\/p>\n<\/td>\n<td>\n<p>$ 2,851.20<\/p>\n<\/td>\n<td>\n<p>.400<\/p>\n<\/td>\n<td>\n<p>$ 1,140.48<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Total<\/strong><\/p>\n<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>\n<p><strong>$ 20,289.28<\/strong><\/p>\n<p><strong>( $ 600 scrap value remains, plus $ 1,110.72 difference \u2013 to be handled via accounting, etc., adjustment, as discussed above)<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 5: Depreciation by Period via the Double Declining Balance Method<\/strong><\/p>\n<p>As before, the idea is to illustrate what transpires within the DAX <code>DDB()<\/code> function. It is important to always keep in mind that the business environment will stipulate, via accounting \/ finance \/ tax considerations, the depreciation policies \u2013 and hence the specific method &#8211; that will drive the DAX function you select for a given task, as I have stated already.<\/p>\n<h3>Syntax<\/h3>\n<p>Syntactically, the parameters \/ arguments you provide are specified within the parentheses to the right of <code>DDB()<\/code> as shown:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">DDB(&lt;cost&gt;, &lt;salvage&gt;, &lt;life&gt;, &lt;period&gt;[, &lt;factor&gt;])<\/pre>\n<p>The arguments common to the DAX depreciation functions as a group are explained in the section named <em>Shared Parameters for DAX Financial Functions for Depreciation<\/em> above. The <em>Period<\/em> and <em>Factor<\/em> (where applicable) parameters, relevant to this function, do not occur in all DAX depreciation functions.<\/p>\n<p><strong>Period<\/strong> \u2013 The period for which you wish to calculate depreciation. Must use the same units as<strong> Life<\/strong>, with a value between 1 and<strong> Life<\/strong> (inclusive).<\/p>\n<p><strong>Factor<\/strong> \u2013 (Optional) The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the <strong>Double Declining Balance<\/strong> method).<\/p>\n<h3>Return Value and Further Remarks<\/h3>\n<p>The DAX <code>DDB()<\/code> function returns the <em>Double Declining Balance<\/em> depreciation for the specified period.<\/p>\n<p>You\u2019ll get some hands-on practice with\u00a0<code>DDB()<\/code> in Power BI Desktop in the next section.<\/p>\n<h3>Practice<\/h3>\n<p>As has been the case with the depreciation functions in the previous exercises, using the data contained in the Power BI model you have downloaded and prepared above will help to clarify and activate what you\u2019ve learned about the operation of <code>DDB()<\/code> to this point. You\u2019ll begin with the dataset that appears in the model, once again, and create calculations that employ <code>DDB()<\/code>, whose parameters are selected from the assets data in the table provided. And, as you have done with the other functions you\u2019ve examined in this article, the \u201canswer\u201d to be expected via each calculation you create will appear in the associated practice step of this section for easy comparison.<\/p>\n<h4>Employ the DAX <strong>DDB() <\/strong>Function to Generate Double Declining Balance Depreciation Values<\/h4>\n<p>You can take the following steps to create a calculation to generate <em>Double Declining Balance<\/em> depreciation values for each of the years of the lives of the assets in the practice data set.<\/p>\n<p><em>Create Five Separate DDB() Calculations, One for Each Year of Asset Life<\/em><\/p>\n<ol>\n<li>From the <em>Report<\/em> view, right-click the <em>Assets<\/em> table in the <em>Fields<\/em> pane of the model.<\/li>\n<li>Selecting <em>New<\/em> <em>column<\/em> from the context menu that appears, as you did within the calculations created for earlier practice exercise steps of this article, and following the steps you took in creating a calculation there, create the following five calculations within the <em>Assets<\/em> table of the model:<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>\n<p>Calculation Name<\/p>\n<\/td>\n<td>\n<p>Calculation Syntax<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DDB-2017<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DDB-2017 = <\/code><\/p>\n<p><code>   DDB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],1<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DDB-2018<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DDB-2018 = <\/code><\/p>\n<p><code>   DDB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],2<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DDB-2019<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DDB-2019 = <\/code><\/p>\n<p><code>   DDB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],3<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<p>&nbsp;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DDB-2020<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DDB-2020 = <\/code><\/p>\n<p><code>   DDB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],4<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><code>z_DDB-2021<\/code><\/p>\n<\/td>\n<td>\n<p><code>z_DDB-2021 = <\/code><\/p>\n<p><code>   DDB(<\/code><\/p>\n<p><code>        Assets[Cost],<\/code><\/p>\n<p><code>           Assets[Salvage],<\/code><\/p>\n<p><code>        Assets[Life],5<\/code><\/p>\n<p><code>       )<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Table 5: Double Declining Balance Method Calculations to Add to the Assets Table<\/strong><\/p>\n<p>The calculations appear in the <em>Fields<\/em> pane, <em>Assets<\/em> table, as depicted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"825\" class=\"wp-image-89405\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-20.png\" \/><\/p>\n<p><strong>Illustration 21: z_DDB() Calculations in the Fields Pane<\/strong><\/p>\n<ol start=\"4\">\n<li>For each new calculated column in the <em>z_DDB()<\/em> group, select the calculation and make the following <em>Format<\/em> settings (<em>Column<\/em> <em>tools<\/em> menu), as done with calculations in previous sections.\n<ul>\n<li>Currency ($)<\/li>\n<li>2 decimal places<\/li>\n<li>Don\u2019t summarize<\/li>\n<\/ul>\n<\/li>\n<li>Ensuring that the <em>Asset Details: Double Declining Balance Depreciation (z_DDB())<\/em> table visualization is selected, add the new <em>z_DDB()<\/em> calculations to the <em>Values<\/em> section of the <em>Fields<\/em> tab for the table, underneath the existing <em>Life<\/em> column.<\/li>\n<\/ol>\n<p>The five, newly added <em>z_DDB()<\/em> values, each generating the depreciation charged to the respective period year, appear within the <em>Asset Details: Double Declining Balance Depreciation (z_DDB())<\/em> table visualization as shown. This can serve as a means of checking the output accuracy of the new calculation within your own Power BI Desktop model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"454\" class=\"wp-image-89406\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-21.png\" \/><\/p>\n<p><strong>Illustration 22: DDB() Depreciation Value for Respective Year Returned via the New Calculations<\/strong><\/p>\n<p>As with the previous depreciation functions within this article, if you\u2019ve obtained similar results to the above for <code>DDB()<\/code>, you can conclude that you\u2019ve successfully assembled the calculations to demonstrate the operation of this financial function over the lives of assets with the characteristics described in the data.<\/p>\n<h2>Final Arrangement for Comparison of the DAX Depreciation Functions<\/h2>\n<p>Now that you\u2019ve finished creating a set of similar tables, within a single Power BI model, that generate depreciation with each DAX depreciation function respectively, you might want to arrange these tables for easy comparison of the outputs of these functions. While you may have a specific approach in mind for designing your own arrangement, you will find that this can easily be done by taking steps similar to those that follow.<\/p>\n<h3>Arrange the Tables Housing the Individual DAX Depreciation Functions to Permit Easy Comparison<\/h3>\n<p>You can adjust sizing on the four tables you have created within the practice exercises, and then align \/ stack them atop each other to achieve an arrangement somewhat as shown.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"640\" class=\"wp-image-89407\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/01\/word-image-22.png\" \/><\/p>\n<p><strong>Illustration 23: A Suggested Re-arrangement of the DAX Depreciation Tables<\/strong><\/p>\n<p>You might prefer to show only one table, based upon the exact choices of depreciation method made in the business environment, of course, or perhaps based upon parameterization to support the examination of the output of different method selections, or other variable values, at runtime. These and other options are, of course, easily accommodated with Power BI.<\/p>\n<h2>Summary<\/h2>\n<p>In this, second of a group of articles overviewing the new DAX financial functions, I introduced another popular subgroup of those functions that focuses upon depreciation. My objective was to examine how each function can be employed, within Power BI, to support analysis and reporting of the sort one might accomplish using Microsoft Excel. For each function you explored, you learned its purpose, then examined the DAX syntax involved in its use. Moreover, you gained exposure, via an illustrative example for each function, used the respective function with practice assets data, and then confirmed your understanding of the results you had obtained with each function.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson continues his series surrounding the DAX financial functions. In this article, he exposes four functions that are popular in the calculation of depreciation and amortization. Those accustomed to these functions within Excel will find the syntax, uses and operation of the functions familiar within the Power BI environment.&hellip;<\/p>\n","protected":false},"author":221883,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143528,159166],"tags":[124831,126382,126394,124833,126395,5872,126385,126386,126393,126381,124822,126390,126392,4643,126391,124828,6045,126388,101611,5871,4476,126383,5134,126387,126389,124832,126384,124836,124830,124829,124835],"coauthors":[48707],"class_list":["post-89384","post","type-post","status-publish","format-standard","hentry","category-bi-sql-server","category-powerbi","tag-aggregation","tag-amortization","tag-balance","tag-calculation","tag-column","tag-dax","tag-db","tag-ddb","tag-declining","tag-depreciation","tag-desktop","tag-digits","tag-double","tag-excel","tag-fixed","tag-format","tag-function","tag-line","tag-power-bi","tag-powerpivot","tag-report","tag-sln","tag-sql-prompt","tag-straight","tag-sum-of-years","tag-summarize","tag-syd","tag-table","tag-total","tag-visual","tag-visualization"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/89384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221883"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=89384"}],"version-history":[{"count":15,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/89384\/revisions"}],"predecessor-version":[{"id":89426,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/89384\/revisions\/89426"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=89384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=89384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=89384"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=89384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}