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
172heavy
Frequent Visitor

Time Intelligence YTD Based on a Measure

I have what should be a very simple problem that has been very challenging to overcome. I suspect I am complicating it!

 

I am trying to show the depreciation curve as assets reach the residual value alongside the potential holding cost, the curve is an easy task to accomplish, the issue I am having is that I want to aggregate the total depreciation each month so that I can see the impact of holding certain assets longer vs selling now. 

 

The measure that I am using to calulate the curve is here. 

 

Sum_Depr_Calc_End_Date = CALCULATE(SUM(tbl_OnOffRentStatusRO[MonthlyDepr]),FILTER(ALLSELECTED(tbl_OnOffRentStatusRO), (tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date] >=MAX(tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date]))))

 

How do I take the result of each period and add it to the previous period? Also I noticed that when I drill up the data is not summed correctly. For instance is the depreciation for each month is 500k for a year then the total depreciation for the year should be 500k * 12. see pictures below. 

 

1-27-2017 10-54-13 AM.png1-27-2017 11-37-52 AM.png

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@172heavy

One thing that stands out immediately in the formula

You need to get (filter) allselected dates up to the current date you are on...

 

Sum_Depr_Calc_End_Date =
CALCULATE (
    SUM ( tbl_OnOffRentStatusRO[MonthlyDepr] ),
    FILTER (
        ALLSELECTED ( tbl_OnOffRentStatusRO ),
        tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date]
            <= MAX ( tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date] )
    )
)

 

Good Luck! Smiley Happy

 

View solution in original post

2 REPLIES 2

Here are a couple of articles you may find helpful

 

http://exceleratorbi.com.au/dax-time-intelligence-beginners/

http://exceleratorbi.com.au/best-practices-power-pivot-power-query-power-bi/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Sean
Community Champion
Community Champion

@172heavy

One thing that stands out immediately in the formula

You need to get (filter) allselected dates up to the current date you are on...

 

Sum_Depr_Calc_End_Date =
CALCULATE (
    SUM ( tbl_OnOffRentStatusRO[MonthlyDepr] ),
    FILTER (
        ALLSELECTED ( tbl_OnOffRentStatusRO ),
        tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date]
            <= MAX ( tbl_OnOffRentStatusRO[Deprecation_End_Date].[Date] )
    )
)

 

Good Luck! Smiley Happy

 

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.