Forum Discussion

Andiko's avatar
Andiko
Frequent Visitor
1 year ago
Solved

Problem with DateADD, Running Totals and Dates

Hello!   I have a Meassure called [Cumulative Recurring Revenue] which calculates the Cumulative Revenue Using the formula below:     CALCULATE([W_Revenue_Recurring], FILTER( ALLSELECTED('C...
  • shafiz_p's avatar
    1 year ago

    Hi Andiko  Try update your measures using the below code:

    Use ALL function instead of ALLSELECTED in Cumulative Recurring Revenue.

    Cumulative Recurring Revenue =
    
    CALCULATE(
            [W_Revenue_Recurring],
    	FILTER(
    		ALL('Calendar'[Date]),
    		'Calendar'[Date] <= max(InputDB[Close_Date])
    	)
    )

     

    And 

    Cumulative Recurring Revenue - Shifted =
    
    CALCULATE(
    	[Cumulative Recurring Revenue],
            SAMEPERIODLASTYEAR('Calendar'[Date])
    )

     

    Output:

     

     

    Hope this helps!!

    If this solved your problem, Please accept it as a solution!!

     

     

    Best Regards,
    Shahariar Hafiz