Forum Discussion

BGB's avatar
BGB
Helper II
4 years ago
Solved

Current Month Day No Forecast

Hi All,   I'm doing forecast figures for some projects and I have been asked that in the current month (in this case March 2022) when the date is below the 15th the forecast figure should be Previo...
  • coskuersanli's avatar
    4 years ago

    How about now? Tomorrow it will be 485 😁

     

     

    Measure = 
    
    SWITCH
    	(
    		TRUE(),
    		AND
    			(
                    
    				SELECTEDVALUE('Date'[Month_no]) < MONTH(TODAY()), 
    				SELECTEDVALUE('Date'[Year]) <= YEAR(TODAY())
    			),
            SUM('Budget Actual'[Actual Cost]), --Before Active Month
    		AND
    			(
                    
    				SELECTEDVALUE('Date'[Month_no]) > MONTH(TODAY()), 
    				SELECTEDVALUE('Date'[Year]) >= YEAR(TODAY())
    			),
    		[Actual and forecast], --After Active Month
    		TODAY () < 
    			DATE
    				(
    					YEAR(TODAY()),
    					MONTH(TODAY()),
    					15
    				),
    		[Actual and Forecast PM], -- Active Month, Before 15
    		SUM('Budget Actual'[Actual Cost]) -- Active Month, After 15
    	)